<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>基于Hugo&#43;LoveIt&#43;Gitee搭建个人博客[详细版] - 难知如阴</title><meta name="Description" content="基于LoveIt主题快速构建私人博客系统"><meta property="og:title" content="基于Hugo&#43;LoveIt&#43;Gitee搭建个人博客[详细版]" />
<meta property="og:description" content="基于LoveIt主题快速构建私人博客系统" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://skydominate.gitee.io/build-hugo-with-loveit-basic/" /><meta property="og:image" content="https://skydominate.gitee.io/build-hugo-with-loveit-basic/featured-image-preview.jpg"/><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2021-11-02T10:50:59+08:00" />
<meta property="article:modified_time" content="2021-11-03T12:29:59+08:00" />

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://skydominate.gitee.io/build-hugo-with-loveit-basic/featured-image-preview.jpg"/>
<meta name="twitter:title" content="基于Hugo&#43;LoveIt&#43;Gitee搭建个人博客[详细版]"/>
<meta name="twitter:description" content="基于LoveIt主题快速构建私人博客系统"/>
<meta name="application-name" content="难知如阴">
<meta name="apple-mobile-web-app-title" content="难知如阴"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://skydominate.gitee.io/build-hugo-with-loveit-basic/" /><link rel="prev" href="https://skydominate.gitee.io/book-recommended/" /><link rel="next" href="https://skydominate.gitee.io/build-hugo-with-loveit/" /><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/normalize.css@8.0.1/normalize.min.css"><link rel="stylesheet" href="/css/style.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.13.0/css/all.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "基于Hugo+LoveIt+Gitee搭建个人博客[详细版]",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/skydominate.gitee.io\/build-hugo-with-loveit-basic\/"
        },"image": [{
                            "@type": "ImageObject",
                            "url": "https:\/\/skydominate.gitee.io\/build-hugo-with-loveit-basic\/featured-image-preview.jpg",
                            "width":  640 ,
                            "height":  325 
                        }],"genre": "posts","keywords": "博客, Hugo, 教程","wordcount":  9982 ,
        "url": "https:\/\/skydominate.gitee.io\/build-hugo-with-loveit-basic\/","datePublished": "2021-11-02T10:50:59+08:00","dateModified": "2021-11-03T12:29:59+08:00","license": "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.","publisher": {
            "@type": "Organization",
            "name": "Lioyd Shaw","logo": {
                    "@type": "ImageObject",
                    "url": "https:\/\/skydominate.gitee.io\/images\/shadow.jpg",
                    "width":  1024 ,
                    "height":  576 
                }},"author": {
                "@type": "Person",
                "name": "lizilong"
            },"description": "基于LoveIt主题快速构建私人博客系统"
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/" title="难知如阴"><span class="header-title-pre"><i class='fas fa-theater-masks fa-fw'></i></span>难知如阴</a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/posts/"> 所有文章 </a><a class="menu-item" href="/tags/"> 标签 </a><a class="menu-item" href="/categories/"> 分类 </a><a class="menu-item" href="/categories/documentation/"> 文档 </a><a class="menu-item" href="/about/"> 关于 </a><a class="menu-item" href="https://github.com/dillonzq/LoveIt" title="GitHub" rel="noopener noreffer" target="_blank"><i class='fab fa-github fa-fw'></i>  </a><span class="menu-item delimiter"></span><a href="javascript:void(0);" class="menu-item language" title="选择语言">简体中文<i class="fas fa-chevron-right fa-fw"></i>
                        <select class="language-select" id="language-select-desktop" onchange="location = this.value;"><option value="/build-hugo-with-loveit-basic/" selected>简体中文</option></select>
                    </a><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-desktop">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/" title="难知如阴"><span class="header-title-pre"><i class='fas fa-theater-masks fa-fw'></i></span>难知如阴</a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-mobile">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/posts/" title="">所有文章</a><a class="menu-item" href="/tags/" title="">标签</a><a class="menu-item" href="/categories/" title="">分类</a><a class="menu-item" href="/categories/documentation/" title="">文档</a><a class="menu-item" href="/about/" title="">关于</a><a class="menu-item" href="https://github.com/dillonzq/LoveIt" title="GitHub" rel="noopener noreffer" target="_blank"><i class='fab fa-github fa-fw'></i></a><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                <i class="fas fa-adjust fa-fw"></i>
            </a><a href="javascript:void(0);" class="menu-item" title="选择语言">简体中文<i class="fas fa-chevron-right fa-fw"></i>
                    <select class="language-select" onchange="location = this.value;"><option value="/build-hugo-with-loveit-basic/" selected>简体中文</option></select>
                </a></div>
    </div>
</header>
<div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div>
<main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">基于Hugo&#43;LoveIt&#43;Gitee搭建个人博客[详细版]</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="https://lizilong1993.gitee.io" title="Author" target="_blank" rel="noopener noreffer author" class="author"><i class="fas fa-user-circle fa-fw"></i>lizilong</a></span>&nbsp;<span class="post-category">收录于 <a href="/categories/documentation/"><i class="far fa-folder fa-fw"></i>文档</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2021-11-02">2021-11-02</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 9982 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 20 分钟&nbsp;<span id="/build-hugo-with-loveit-basic/" class="leancloud_visitors" data-flag-title="基于Hugo&#43;LoveIt&#43;Gitee搭建个人博客[详细版]">
                        <i class="far fa-eye fa-fw"></i>&nbsp;<span class=leancloud-visitors-count></span>&nbsp;次阅读
                    </span>&nbsp;</div>
        </div><div class="details toc" id="toc-static"  kept="">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#abstract">1.  简介</a></li>
    <li><a href="#prepare">2. 环境</a></li>
    <li><a href="#installation">3. 搭建过程</a>
      <ul>
        <li><a href="#31-选一个主题">3.1 选一个主题</a></li>
        <li><a href="#32-安装">3.2 安装</a>
          <ul>
            <li><a href="#321-创建一个项目">3.2.1 创建一个项目</a></li>
            <li><a href="#322-安装主题">3.2.2 安装主题</a></li>
            <li><a href="#323-主题配置">3.2.3 主题配置</a></li>
            <li><a href="#324-创建一篇文章">3.2.4 创建一篇文章</a></li>
            <li><a href="#325-本地启动网站">3.2.5 本地启动网站</a></li>
            <li><a href="#326-构建网站">3.2.6 构建网站</a></li>
          </ul>
        </li>
        <li><a href="#34-配置">3.4. 配置</a>
          <ul>
            <li><a href="#341-网站配置">3.4.1 网站配置</a></li>
            <li><a href="#342-hugo的运行环境">3.4.2 Hugo的运行环境</a></li>
            <li><a href="#343-cnd配置技巧">3.4.3 CND配置技巧</a></li>
            <li><a href="#344-关于社交链接配置的技巧">3.4.4 关于社交链接配置的技巧</a></li>
            <li><a href="#345-网站图标-浏览器配置-网站清单">3.4.5 网站图标, 浏览器配置, 网站清单</a></li>
            <li><a href="#346-自定义样式">3.4.6 自定义样式</a></li>
          </ul>
        </li>
        <li><a href="#multilanguage">3.5. 多语言和 i18n</a>
          <ul>
            <li><a href="#351-兼容性">3.5.1 兼容性</a></li>
            <li><a href="#352-基本配置">3.5.2 基本配置</a></li>
            <li><a href="#353-修改默认的翻译字符串">3.5.3 修改默认的翻译字符串</a></li>
          </ul>
        </li>
        <li><a href="#search">3.6. 搜索</a>
          <ul>
            <li><a href="#361-输出配置">3.6.1 输出配置</a></li>
            <li><a href="#362-搜索配置">3.6.2 搜索配置</a></li>
          </ul>
        </li>
      </ul>
    </li>
    <li><a href="#page">4 页面组织</a>
      <ul>
        <li><a href="#41-内容组织">4.1 内容组织</a></li>
        <li><a href="#42-前置参数">4.2 前置参数</a></li>
        <li><a href="#43-内容摘要">4.3 内容摘要</a>
          <ul>
            <li><a href="#431-自动摘要拆分">4.3.1 自动摘要拆分</a></li>
            <li><a href="#432-手动摘要拆分">4.3.2 手动摘要拆分</a></li>
            <li><a href="#433-前置参数摘要">4.3.3 前置参数摘要</a></li>
            <li><a href="#434-使用文章描述作为摘要">4.3.4 使用文章描述作为摘要</a></li>
            <li><a href="#435-摘要选择的优先级顺序">4.3.5 摘要选择的优先级顺序</a></li>
          </ul>
        </li>
      </ul>
    </li>
    <li><a href="#function">5. 支持的功能</a>
      <ul>
        <li><a href="#51-markdown基本语法">5.1 Markdown基本语法</a></li>
        <li><a href="#52-markdown扩展语法">5.2 Markdown扩展语法</a></li>
        <li><a href="#53-emoji支持">5.3 Emoji支持</a></li>
        <li><a href="#54-数学公式">5.4 数学公式</a></li>
        <li><a href="#55-字符注音或者注释">5.5 字符注音或者注释</a></li>
        <li><a href="#56-分数">5.6 分数</a></li>
        <li><a href="#57-font-awesome">5.7 Font Awesome</a></li>
        <li><a href="#58-转义字符">5.8 转义字符</a></li>
      </ul>
    </li>
    <li><a href="#auto_push">6 自动化部署到Gitee</a>
      <ul>
        <li><a href="#61新建仓库">6.1新建仓库</a></li>
        <li><a href="#62-生成个人令牌">6.2 生成个人令牌</a></li>
        <li><a href="#63-自动化部署">6.3 自动化部署</a></li>
        <li><a href="#64-开启gitee-pages服务">6.4 开启Gitee Pages服务</a></li>
      </ul>
    </li>
    <li><a href="#done">7 完成</a></li>
    <li><a href="#参考资料">参考资料</a></li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><h2 id="abstract">1.  简介</h2>
<p>Hugo是由Go语言实现的静态网站生成器。简单、易用、高效、易扩展、快速部署。
​</p>
<p>该篇文章是在Linux/UOS系统下安装搭建 Hugo 博客,在Windows环境下基本一致。</p>
<h2 id="prepare">2. 环境</h2>
<ul>
<li><a href="https://github.com/gohugoio/hugo/releases" target="_blank" rel="noopener noreffer">hugo v.0.88.1</a></li>
<li><a href="https://themes.gohugo.io/" target="_blank" rel="noopener noreffer">Hugo Themes (gohugo.io)</a></li>
<li>git v2.20.1</li>
</ul>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo version <span class="c1">#查看是否正确安装</span>
git --version <span class="c1">#git安装最新的就好，版本没啥影响</span>
</code></pre></td></tr></table>
</div>
</div><h2 id="installation">3. 搭建过程</h2>
<h3 id="31-选一个主题">3.1 选一个主题</h3>
<p>我这里选中了LoveIt<a href="https://themes.gohugo.io/themes/loveit/" target="_blank" rel="noopener noreffer">LoveIt | Hugo Themes (gohugo.io)</a>，个人非常喜欢这种简单颜色分明的主题，并且可定制化。</p>
<p>这是官网效果：</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111012107402.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111012107402.png, https://gitee.com/lizilong1993/image/raw/master/202111012107402.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111012107402.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111012107402.png"
        title="image-20211101210655241" /></p>
<h3 id="32-安装">3.2 安装</h3>
<h4 id="321-创建一个项目">3.2.1 创建一个项目</h4>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo new site myblog  <span class="c1"># myblog是你的项目名，叫啥都行</span>
<span class="nb">cd</span> myblog
</code></pre></td></tr></table>
</div>
</div><h4 id="322-安装主题">3.2.2 安装主题</h4>
<blockquote>
<p>全文参考<a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/" target="_blank" rel="noopener noreffer">LoveIt主题官方文档</a>。</p>
</blockquote>
<p><strong>LoveIt</strong> 主题的仓库是: <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer">https://github.com/dillonzq/LoveIt</a>.</p>
<p>你可以下载主题的 <a href="https://github.com/dillonzq/LoveIt/releases" target="_blank" rel="noopener noreffer">最新版本 .zip 文件</a> 并且解压放到 <code>themes</code> 目录.另外, 也可以直接把这个主题克隆到 <code>themes</code> 目录:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">git clone https://github.com/dillonzq/LoveIt.git themes/LoveIt
</code></pre></td></tr></table>
</div>
</div><p>或者, 初始化你的项目目录为 git 仓库, 并且把主题仓库作为你的网站目录的子模块:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">git init
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
</code></pre></td></tr></table>
</div>
</div><h4 id="323-主题配置">3.2.3 主题配置</h4>
<p>以下是 LoveIt 主题的基本配置:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="nx">baseURL</span> <span class="p">=</span> <span class="s2">&#34;http://example.org/&#34;</span>
<span class="c"># [en, zh-cn, fr, ...] 设置默认的语言</span>
<span class="nx">defaultContentLanguage</span> <span class="p">=</span> <span class="s2">&#34;zh-cn&#34;</span>
<span class="c"># 网站语言, 仅在这里 CN 大写</span>
<span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;zh-CN&#34;</span>
<span class="c"># 是否包括中日韩文字</span>
<span class="nx">hasCJKLanguage</span> <span class="p">=</span> <span class="kc">true</span>
<span class="c"># 网站标题</span>
<span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;我的全新 Hugo 网站&#34;</span>

<span class="c"># 更改使用 Hugo 构建网站时使用的默认主题</span>
<span class="nx">theme</span> <span class="p">=</span> <span class="s2">&#34;LoveIt&#34;</span>

<span class="p">[</span><span class="nx">params</span><span class="p">]</span>
  <span class="c"># LoveIt 主题版本</span>
  <span class="nx">version</span> <span class="p">=</span> <span class="s2">&#34;0.2.X&#34;</span>

<span class="p">[</span><span class="nx">menu</span><span class="p">]</span>
  <span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
    <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;posts&#34;</span>
    <span class="c"># 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标</span>
    <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c"># 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标</span>
    <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;文章&#34;</span>
    <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/posts/&#34;</span>
    <span class="c"># 当你将鼠标悬停在此菜单链接上时, 将显示的标题</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
  <span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
    <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;tags&#34;</span>
    <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;标签&#34;</span>
    <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/tags/&#34;</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">2</span>
  <span class="p">[[</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
    <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;categories&#34;</span>
    <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;分类&#34;</span>
    <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/categories/&#34;</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">3</span>

<span class="c"># Hugo 解析文档的配置</span>
<span class="p">[</span><span class="nx">markup</span><span class="p">]</span>
  <span class="c"># 语法高亮设置 (https://gohugo.io/content-management/syntax-highlighting)</span>
  <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">highlight</span><span class="p">]</span>
    <span class="c"># false 是必要的设置 (https://github.com/dillonzq/LoveIt/issues/158)</span>
    <span class="nx">noClasses</span> <span class="p">=</span> <span class="kc">false</span>

</code></pre></td></tr></table>
</div>
</div><blockquote>
<p><strong>注意</strong>：在构建网站时, 你可以使用 <code>--theme</code> 选项设置主题. 但是, 我建议你修改配置文件 (<strong>config.toml</strong>) 将本主题设置为默认主题.</p>
</blockquote>
<h4 id="324-创建一篇文章">3.2.4 创建一篇文章</h4>
<p>以下是创建第一篇文章的方法:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo new posts/test.md
</code></pre></td></tr></table>
</div>
</div><p>这将会在/myblog/content/posts/ 路径下创建一个test.md。</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111012145017.png" alt="image-20211101214507966" style="zoom: 80%;" /></p>
<p>让我们来看看这个test.md文件里的内容。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111012147108.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111012147108.png, https://gitee.com/lizilong1993/image/raw/master/202111012147108.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111012147108.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111012147108.png"
        title="image-20211101214751066" /></p>
<blockquote>
<p>默认情况下, 所有文章和页面均作为草稿创建. 如果想要渲染这些页面, 请从元数据中删除属性 <code>draft: true</code>, 设置属性 <code>draft: false</code> 或者为 <code>hugo</code> 命令添加 <code>-D</code>/<code>--buildDrafts</code> 参数.</p>
</blockquote>
<h4 id="325-本地启动网站">3.2.5 本地启动网站</h4>
<p>​       使用以下命令启动网站:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo serve
</code></pre></td></tr></table>
</div>
</div><p>去查看 <code>http://localhost:1313</code>.</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021029602.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021029602.png, https://gitee.com/lizilong1993/image/raw/master/202111021029602.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021029602.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021029602.png"
        title="image-20211102102908470" /></p>
<blockquote>
<p>在hugo serve 状态下，当文件内容更改时, 页面会随着更改自动刷新.</p>
</blockquote>
<blockquote>
<p>由于本主题使用了 Hugo 中的 .Scratch 来实现一些特性, 非常建议你为 <code>hugo server </code>命令添加 ``&ndash;disableFastRender `参数来实时预览你正在编辑的文章页面.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo serve --disableFastRender
</code></pre></td></tr></table>
</div>
</div></blockquote>
<h4 id="326-构建网站">3.2.6 构建网站</h4>
<p>当你准备好部署你的网站时, 运行以下命令:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">hugo
</code></pre></td></tr></table>
</div>
</div><p>会生成一个 <code>public</code> 目录, 其中包含你网站的所有静态内容和资源. 现在可以将其部署在任何 Web 服务器上.</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021033713.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021033713.png, https://gitee.com/lizilong1993/image/raw/master/202111021033713.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021033713.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021033713.png"
        title="image-20211102103352671" /></p>
<blockquote>
<p><strong>技巧</strong></p>
<p>网站内容可以通过<code>Netlify </code>自动发布和托管 (了解有关<a href="https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/" target="_blank" rel="noopener noreffer">通过 Netlify 进行 HUGO 自动化部署 </a>的更多信息). 或者, 您可以使用 AWS Amplify, Github pages, Render 以及更多…</p>
</blockquote>
<h3 id="34-配置">3.4. 配置</h3>
<h4 id="341-网站配置">3.4.1 网站配置</h4>
<p>除了 <a href="https://gohugo.io/overview/configuration/" target="_blank" rel="noopener noreffer">Hugo 全局配置</a> 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration" target="_blank" rel="noopener noreffer">菜单配置</a> 之外, <strong>LoveIt</strong> 主题还允许您在网站配置中定义以下参数 (这是一个示例 <code>config.toml</code>, 其内容为默认值).</p>
<p>请打开下面的代码块查看完整的示例配置 :</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">  1
</span><span class="lnt">  2
</span><span class="lnt">  3
</span><span class="lnt">  4
</span><span class="lnt">  5
</span><span class="lnt">  6
</span><span class="lnt">  7
</span><span class="lnt">  8
</span><span class="lnt">  9
</span><span class="lnt"> 10
</span><span class="lnt"> 11
</span><span class="lnt"> 12
</span><span class="lnt"> 13
</span><span class="lnt"> 14
</span><span class="lnt"> 15
</span><span class="lnt"> 16
</span><span class="lnt"> 17
</span><span class="lnt"> 18
</span><span class="lnt"> 19
</span><span class="lnt"> 20
</span><span class="lnt"> 21
</span><span class="lnt"> 22
</span><span class="lnt"> 23
</span><span class="lnt"> 24
</span><span class="lnt"> 25
</span><span class="lnt"> 26
</span><span class="lnt"> 27
</span><span class="lnt"> 28
</span><span class="lnt"> 29
</span><span class="lnt"> 30
</span><span class="lnt"> 31
</span><span class="lnt"> 32
</span><span class="lnt"> 33
</span><span class="lnt"> 34
</span><span class="lnt"> 35
</span><span class="lnt"> 36
</span><span class="lnt"> 37
</span><span class="lnt"> 38
</span><span class="lnt"> 39
</span><span class="lnt"> 40
</span><span class="lnt"> 41
</span><span class="lnt"> 42
</span><span class="lnt"> 43
</span><span class="lnt"> 44
</span><span class="lnt"> 45
</span><span class="lnt"> 46
</span><span class="lnt"> 47
</span><span class="lnt"> 48
</span><span class="lnt"> 49
</span><span class="lnt"> 50
</span><span class="lnt"> 51
</span><span class="lnt"> 52
</span><span class="lnt"> 53
</span><span class="lnt"> 54
</span><span class="lnt"> 55
</span><span class="lnt"> 56
</span><span class="lnt"> 57
</span><span class="lnt"> 58
</span><span class="lnt"> 59
</span><span class="lnt"> 60
</span><span class="lnt"> 61
</span><span class="lnt"> 62
</span><span class="lnt"> 63
</span><span class="lnt"> 64
</span><span class="lnt"> 65
</span><span class="lnt"> 66
</span><span class="lnt"> 67
</span><span class="lnt"> 68
</span><span class="lnt"> 69
</span><span class="lnt"> 70
</span><span class="lnt"> 71
</span><span class="lnt"> 72
</span><span class="lnt"> 73
</span><span class="lnt"> 74
</span><span class="lnt"> 75
</span><span class="lnt"> 76
</span><span class="lnt"> 77
</span><span class="lnt"> 78
</span><span class="lnt"> 79
</span><span class="lnt"> 80
</span><span class="lnt"> 81
</span><span class="lnt"> 82
</span><span class="lnt"> 83
</span><span class="lnt"> 84
</span><span class="lnt"> 85
</span><span class="lnt"> 86
</span><span class="lnt"> 87
</span><span class="lnt"> 88
</span><span class="lnt"> 89
</span><span class="lnt"> 90
</span><span class="lnt"> 91
</span><span class="lnt"> 92
</span><span class="lnt"> 93
</span><span class="lnt"> 94
</span><span class="lnt"> 95
</span><span class="lnt"> 96
</span><span class="lnt"> 97
</span><span class="lnt"> 98
</span><span class="lnt"> 99
</span><span class="lnt">100
</span><span class="lnt">101
</span><span class="lnt">102
</span><span class="lnt">103
</span><span class="lnt">104
</span><span class="lnt">105
</span><span class="lnt">106
</span><span class="lnt">107
</span><span class="lnt">108
</span><span class="lnt">109
</span><span class="lnt">110
</span><span class="lnt">111
</span><span class="lnt">112
</span><span class="lnt">113
</span><span class="lnt">114
</span><span class="lnt">115
</span><span class="lnt">116
</span><span class="lnt">117
</span><span class="lnt">118
</span><span class="lnt">119
</span><span class="lnt">120
</span><span class="lnt">121
</span><span class="lnt">122
</span><span class="lnt">123
</span><span class="lnt">124
</span><span class="lnt">125
</span><span class="lnt">126
</span><span class="lnt">127
</span><span class="lnt">128
</span><span class="lnt">129
</span><span class="lnt">130
</span><span class="lnt">131
</span><span class="lnt">132
</span><span class="lnt">133
</span><span class="lnt">134
</span><span class="lnt">135
</span><span class="lnt">136
</span><span class="lnt">137
</span><span class="lnt">138
</span><span class="lnt">139
</span><span class="lnt">140
</span><span class="lnt">141
</span><span class="lnt">142
</span><span class="lnt">143
</span><span class="lnt">144
</span><span class="lnt">145
</span><span class="lnt">146
</span><span class="lnt">147
</span><span class="lnt">148
</span><span class="lnt">149
</span><span class="lnt">150
</span><span class="lnt">151
</span><span class="lnt">152
</span><span class="lnt">153
</span><span class="lnt">154
</span><span class="lnt">155
</span><span class="lnt">156
</span><span class="lnt">157
</span><span class="lnt">158
</span><span class="lnt">159
</span><span class="lnt">160
</span><span class="lnt">161
</span><span class="lnt">162
</span><span class="lnt">163
</span><span class="lnt">164
</span><span class="lnt">165
</span><span class="lnt">166
</span><span class="lnt">167
</span><span class="lnt">168
</span><span class="lnt">169
</span><span class="lnt">170
</span><span class="lnt">171
</span><span class="lnt">172
</span><span class="lnt">173
</span><span class="lnt">174
</span><span class="lnt">175
</span><span class="lnt">176
</span><span class="lnt">177
</span><span class="lnt">178
</span><span class="lnt">179
</span><span class="lnt">180
</span><span class="lnt">181
</span><span class="lnt">182
</span><span class="lnt">183
</span><span class="lnt">184
</span><span class="lnt">185
</span><span class="lnt">186
</span><span class="lnt">187
</span><span class="lnt">188
</span><span class="lnt">189
</span><span class="lnt">190
</span><span class="lnt">191
</span><span class="lnt">192
</span><span class="lnt">193
</span><span class="lnt">194
</span><span class="lnt">195
</span><span class="lnt">196
</span><span class="lnt">197
</span><span class="lnt">198
</span><span class="lnt">199
</span><span class="lnt">200
</span><span class="lnt">201
</span><span class="lnt">202
</span><span class="lnt">203
</span><span class="lnt">204
</span><span class="lnt">205
</span><span class="lnt">206
</span><span class="lnt">207
</span><span class="lnt">208
</span><span class="lnt">209
</span><span class="lnt">210
</span><span class="lnt">211
</span><span class="lnt">212
</span><span class="lnt">213
</span><span class="lnt">214
</span><span class="lnt">215
</span><span class="lnt">216
</span><span class="lnt">217
</span><span class="lnt">218
</span><span class="lnt">219
</span><span class="lnt">220
</span><span class="lnt">221
</span><span class="lnt">222
</span><span class="lnt">223
</span><span class="lnt">224
</span><span class="lnt">225
</span><span class="lnt">226
</span><span class="lnt">227
</span><span class="lnt">228
</span><span class="lnt">229
</span><span class="lnt">230
</span><span class="lnt">231
</span><span class="lnt">232
</span><span class="lnt">233
</span><span class="lnt">234
</span><span class="lnt">235
</span><span class="lnt">236
</span><span class="lnt">237
</span><span class="lnt">238
</span><span class="lnt">239
</span><span class="lnt">240
</span><span class="lnt">241
</span><span class="lnt">242
</span><span class="lnt">243
</span><span class="lnt">244
</span><span class="lnt">245
</span><span class="lnt">246
</span><span class="lnt">247
</span><span class="lnt">248
</span><span class="lnt">249
</span><span class="lnt">250
</span><span class="lnt">251
</span><span class="lnt">252
</span><span class="lnt">253
</span><span class="lnt">254
</span><span class="lnt">255
</span><span class="lnt">256
</span><span class="lnt">257
</span><span class="lnt">258
</span><span class="lnt">259
</span><span class="lnt">260
</span><span class="lnt">261
</span><span class="lnt">262
</span><span class="lnt">263
</span><span class="lnt">264
</span><span class="lnt">265
</span><span class="lnt">266
</span><span class="lnt">267
</span><span class="lnt">268
</span><span class="lnt">269
</span><span class="lnt">270
</span><span class="lnt">271
</span><span class="lnt">272
</span><span class="lnt">273
</span><span class="lnt">274
</span><span class="lnt">275
</span><span class="lnt">276
</span><span class="lnt">277
</span><span class="lnt">278
</span><span class="lnt">279
</span><span class="lnt">280
</span><span class="lnt">281
</span><span class="lnt">282
</span><span class="lnt">283
</span><span class="lnt">284
</span><span class="lnt">285
</span><span class="lnt">286
</span><span class="lnt">287
</span><span class="lnt">288
</span><span class="lnt">289
</span><span class="lnt">290
</span><span class="lnt">291
</span><span class="lnt">292
</span><span class="lnt">293
</span><span class="lnt">294
</span><span class="lnt">295
</span><span class="lnt">296
</span><span class="lnt">297
</span><span class="lnt">298
</span><span class="lnt">299
</span><span class="lnt">300
</span><span class="lnt">301
</span><span class="lnt">302
</span><span class="lnt">303
</span><span class="lnt">304
</span><span class="lnt">305
</span><span class="lnt">306
</span><span class="lnt">307
</span><span class="lnt">308
</span><span class="lnt">309
</span><span class="lnt">310
</span><span class="lnt">311
</span><span class="lnt">312
</span><span class="lnt">313
</span><span class="lnt">314
</span><span class="lnt">315
</span><span class="lnt">316
</span><span class="lnt">317
</span><span class="lnt">318
</span><span class="lnt">319
</span><span class="lnt">320
</span><span class="lnt">321
</span><span class="lnt">322
</span><span class="lnt">323
</span><span class="lnt">324
</span><span class="lnt">325
</span><span class="lnt">326
</span><span class="lnt">327
</span><span class="lnt">328
</span><span class="lnt">329
</span><span class="lnt">330
</span><span class="lnt">331
</span><span class="lnt">332
</span><span class="lnt">333
</span><span class="lnt">334
</span><span class="lnt">335
</span><span class="lnt">336
</span><span class="lnt">337
</span><span class="lnt">338
</span><span class="lnt">339
</span><span class="lnt">340
</span><span class="lnt">341
</span><span class="lnt">342
</span><span class="lnt">343
</span><span class="lnt">344
</span><span class="lnt">345
</span><span class="lnt">346
</span><span class="lnt">347
</span><span class="lnt">348
</span><span class="lnt">349
</span><span class="lnt">350
</span><span class="lnt">351
</span><span class="lnt">352
</span><span class="lnt">353
</span><span class="lnt">354
</span><span class="lnt">355
</span><span class="lnt">356
</span><span class="lnt">357
</span><span class="lnt">358
</span><span class="lnt">359
</span><span class="lnt">360
</span><span class="lnt">361
</span><span class="lnt">362
</span><span class="lnt">363
</span><span class="lnt">364
</span><span class="lnt">365
</span><span class="lnt">366
</span><span class="lnt">367
</span><span class="lnt">368
</span><span class="lnt">369
</span><span class="lnt">370
</span><span class="lnt">371
</span><span class="lnt">372
</span><span class="lnt">373
</span><span class="lnt">374
</span><span class="lnt">375
</span><span class="lnt">376
</span><span class="lnt">377
</span><span class="lnt">378
</span><span class="lnt">379
</span><span class="lnt">380
</span><span class="lnt">381
</span><span class="lnt">382
</span><span class="lnt">383
</span><span class="lnt">384
</span><span class="lnt">385
</span><span class="lnt">386
</span><span class="lnt">387
</span><span class="lnt">388
</span><span class="lnt">389
</span><span class="lnt">390
</span><span class="lnt">391
</span><span class="lnt">392
</span><span class="lnt">393
</span><span class="lnt">394
</span><span class="lnt">395
</span><span class="lnt">396
</span><span class="lnt">397
</span><span class="lnt">398
</span><span class="lnt">399
</span><span class="lnt">400
</span><span class="lnt">401
</span><span class="lnt">402
</span><span class="lnt">403
</span><span class="lnt">404
</span><span class="lnt">405
</span><span class="lnt">406
</span><span class="lnt">407
</span><span class="lnt">408
</span><span class="lnt">409
</span><span class="lnt">410
</span><span class="lnt">411
</span><span class="lnt">412
</span><span class="lnt">413
</span><span class="lnt">414
</span><span class="lnt">415
</span><span class="lnt">416
</span><span class="lnt">417
</span><span class="lnt">418
</span><span class="lnt">419
</span><span class="lnt">420
</span><span class="lnt">421
</span><span class="lnt">422
</span><span class="lnt">423
</span><span class="lnt">424
</span><span class="lnt">425
</span><span class="lnt">426
</span><span class="lnt">427
</span><span class="lnt">428
</span><span class="lnt">429
</span><span class="lnt">430
</span><span class="lnt">431
</span><span class="lnt">432
</span><span class="lnt">433
</span><span class="lnt">434
</span><span class="lnt">435
</span><span class="lnt">436
</span><span class="lnt">437
</span><span class="lnt">438
</span><span class="lnt">439
</span><span class="lnt">440
</span><span class="lnt">441
</span><span class="lnt">442
</span><span class="lnt">443
</span><span class="lnt">444
</span><span class="lnt">445
</span><span class="lnt">446
</span><span class="lnt">447
</span><span class="lnt">448
</span><span class="lnt">449
</span><span class="lnt">450
</span><span class="lnt">451
</span><span class="lnt">452
</span><span class="lnt">453
</span><span class="lnt">454
</span><span class="lnt">455
</span><span class="lnt">456
</span><span class="lnt">457
</span><span class="lnt">458
</span><span class="lnt">459
</span><span class="lnt">460
</span><span class="lnt">461
</span><span class="lnt">462
</span><span class="lnt">463
</span><span class="lnt">464
</span><span class="lnt">465
</span><span class="lnt">466
</span><span class="lnt">467
</span><span class="lnt">468
</span><span class="lnt">469
</span><span class="lnt">470
</span><span class="lnt">471
</span><span class="lnt">472
</span><span class="lnt">473
</span><span class="lnt">474
</span><span class="lnt">475
</span><span class="lnt">476
</span><span class="lnt">477
</span><span class="lnt">478
</span><span class="lnt">479
</span><span class="lnt">480
</span><span class="lnt">481
</span><span class="lnt">482
</span><span class="lnt">483
</span><span class="lnt">484
</span><span class="lnt">485
</span><span class="lnt">486
</span><span class="lnt">487
</span><span class="lnt">488
</span><span class="lnt">489
</span><span class="lnt">490
</span><span class="lnt">491
</span><span class="lnt">492
</span><span class="lnt">493
</span><span class="lnt">494
</span><span class="lnt">495
</span><span class="lnt">496
</span><span class="lnt">497
</span><span class="lnt">498
</span><span class="lnt">499
</span><span class="lnt">500
</span><span class="lnt">501
</span><span class="lnt">502
</span><span class="lnt">503
</span><span class="lnt">504
</span><span class="lnt">505
</span><span class="lnt">506
</span><span class="lnt">507
</span><span class="lnt">508
</span><span class="lnt">509
</span><span class="lnt">510
</span><span class="lnt">511
</span><span class="lnt">512
</span><span class="lnt">513
</span><span class="lnt">514
</span><span class="lnt">515
</span><span class="lnt">516
</span><span class="lnt">517
</span><span class="lnt">518
</span><span class="lnt">519
</span><span class="lnt">520
</span><span class="lnt">521
</span><span class="lnt">522
</span><span class="lnt">523
</span><span class="lnt">524
</span><span class="lnt">525
</span><span class="lnt">526
</span><span class="lnt">527
</span><span class="lnt">528
</span><span class="lnt">529
</span><span class="lnt">530
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
  <span class="c">#  LoveIt 主题版本</span>
  <span class="nx">version</span> <span class="p">=</span> <span class="s2">&#34;0.2.X&#34;</span>
  <span class="c"># 网站描述</span>
  <span class="nx">description</span> <span class="p">=</span> <span class="s2">&#34;这是我的全新 Hugo 网站&#34;</span>
  <span class="c"># 网站关键词</span>
  <span class="nx">keywords</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;Theme&#34;</span><span class="p">,</span> <span class="s2">&#34;Hugo&#34;</span><span class="p">]</span>
  <span class="c"># 网站默认主题样式 (&#34;light&#34;, &#34;dark&#34;, &#34;auto&#34;)</span>
  <span class="nx">defaultTheme</span> <span class="p">=</span> <span class="s2">&#34;auto&#34;</span>
  <span class="c"># 公共 git 仓库路径，仅在 enableGitInfo 设为 true 时有效</span>
  <span class="nx">gitRepo</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
  <span class="c">#  哪种哈希函数用来 SRI, 为空时表示不使用 SRI</span>
  <span class="c"># (&#34;sha256&#34;, &#34;sha384&#34;, &#34;sha512&#34;, &#34;md5&#34;)</span>
  <span class="nx">fingerprint</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
  <span class="c">#  日期格式</span>
  <span class="nx">dateFormat</span> <span class="p">=</span> <span class="s2">&#34;2006-01-02&#34;</span>
  <span class="c"># 网站图片, 用于 Open Graph 和 Twitter Cards</span>
  <span class="nx">images</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;/logo.png&#34;</span><span class="p">]</span>

  <span class="c">#  应用图标配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">app</span><span class="p">]</span>
    <span class="c"># 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;LoveIt&#34;</span>
    <span class="c"># 是否隐藏网站图标资源链接</span>
    <span class="nx">noFavicon</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c"># 更现代的 SVG 网站图标, 可替代旧的 .png 和 .ico 文件</span>
    <span class="nx">svgFavicon</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c"># Android 浏览器主题色</span>
    <span class="nx">themeColor</span> <span class="p">=</span> <span class="s2">&#34;#ffffff&#34;</span>
    <span class="c"># Safari 图标颜色</span>
    <span class="nx">iconColor</span> <span class="p">=</span> <span class="s2">&#34;#5bbad5&#34;</span>
    <span class="c"># Windows v8-10磁贴颜色</span>
    <span class="nx">tileColor</span> <span class="p">=</span> <span class="s2">&#34;#da532c&#34;</span>

  <span class="c">#  搜索配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">search</span><span class="p">]</span>
    <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># 搜索引擎的类型 (&#34;lunr&#34;, &#34;algolia&#34;)</span>
    <span class="nx">type</span> <span class="p">=</span> <span class="s2">&#34;lunr&#34;</span>
    <span class="c"># 文章内容最长索引长度</span>
    <span class="nx">contentLength</span> <span class="p">=</span> <span class="mi">4000</span>
    <span class="c"># 搜索框的占位提示语</span>
    <span class="nx">placeholder</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c">#  最大结果数目</span>
    <span class="nx">maxResultLength</span> <span class="p">=</span> <span class="mi">10</span>
    <span class="c">#  结果内容片段长度</span>
    <span class="nx">snippetLength</span> <span class="p">=</span> <span class="mi">50</span>
    <span class="c">#  搜索结果中高亮部分的 HTML 标签</span>
    <span class="nx">highlightTag</span> <span class="p">=</span> <span class="s2">&#34;em&#34;</span>
    <span class="c">#  是否在搜索索引中使用基于 baseURL 的绝对路径</span>
    <span class="nx">absoluteURL</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">search</span><span class="p">.</span><span class="nx">algolia</span><span class="p">]</span>
      <span class="nx">index</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">appID</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">searchKey</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c"># 页面头部导航栏配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">header</span><span class="p">]</span>
    <span class="c"># 桌面端导航栏模式 (&#34;fixed&#34;, &#34;normal&#34;, &#34;auto&#34;)</span>
    <span class="nx">desktopMode</span> <span class="p">=</span> <span class="s2">&#34;fixed&#34;</span>
    <span class="c"># 移动端导航栏模式 (&#34;fixed&#34;, &#34;normal&#34;, &#34;auto&#34;)</span>
    <span class="nx">mobileMode</span> <span class="p">=</span> <span class="s2">&#34;auto&#34;</span>
    <span class="c">#  页面头部导航栏标题配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">header</span><span class="p">.</span><span class="nx">title</span><span class="p">]</span>
      <span class="c"># LOGO 的 URL</span>
      <span class="nx">logo</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 标题名称</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 你可以在名称 (允许 HTML 格式) 之后添加其他信息, 例如图标</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c">#  是否为标题显示打字机动画</span>
      <span class="nx">typeit</span> <span class="p">=</span> <span class="kc">false</span>

  <span class="c"># 页面底部信息配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">footer</span><span class="p">]</span>
    <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  自定义内容 (支持 HTML 格式)</span>
    <span class="nx">custom</span> <span class="p">=</span> <span class="s1">&#39;&#39;</span>
    <span class="c">#  是否显示 Hugo 和主题信息</span>
    <span class="nx">hugo</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  是否显示版权信息</span>
    <span class="nx">copyright</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  是否显示作者</span>
    <span class="nx">author</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># 网站创立年份</span>
    <span class="nx">since</span> <span class="p">=</span> <span class="mi">2019</span>
    <span class="c"># ICP 备案信息，仅在中国使用 (支持 HTML 格式)</span>
    <span class="nx">icp</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c"># 许可协议信息 (支持 HTML 格式)</span>
    <span class="nx">license</span> <span class="p">=</span> <span class="s1">&#39;&lt;a rel=&#34;license external nofollow noopener noreffer&#34; href=&#34;https://creativecommons.org/licenses/by-nc/4.0/&#34; target=&#34;_blank&#34;&gt;CC BY-NC 4.0&lt;/a&gt;&#39;</span>

  <span class="c">#  Section (所有文章) 页面配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">section</span><span class="p">]</span>
    <span class="c"># section 页面每页显示文章数量</span>
    <span class="nx">paginate</span> <span class="p">=</span> <span class="mi">20</span>
    <span class="c"># 日期格式 (月和日)</span>
    <span class="nx">dateFormat</span> <span class="p">=</span> <span class="s2">&#34;01-02&#34;</span>
    <span class="c"># RSS 文章数目</span>
    <span class="nx">rss</span> <span class="p">=</span> <span class="mi">10</span>

  <span class="c">#  List (目录或标签) 页面配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">list</span><span class="p">]</span>
    <span class="c"># list 页面每页显示文章数量</span>
    <span class="nx">paginate</span> <span class="p">=</span> <span class="mi">20</span>
    <span class="c"># 日期格式 (月和日)</span>
    <span class="nx">dateFormat</span> <span class="p">=</span> <span class="s2">&#34;01-02&#34;</span>
    <span class="c"># RSS 文章数目</span>
    <span class="nx">rss</span> <span class="p">=</span> <span class="mi">10</span>

  <span class="c"># 主页配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">home</span><span class="p">]</span>
    <span class="c">#  RSS 文章数目</span>
    <span class="nx">rss</span> <span class="p">=</span> <span class="mi">10</span>
    <span class="c"># 主页个人信息</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">home</span><span class="p">.</span><span class="nx">profile</span><span class="p">]</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># Gravatar 邮箱，用于优先在主页显示的头像</span>
      <span class="nx">gravatarEmail</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 主页显示头像的 URL</span>
      <span class="nx">avatarURL</span> <span class="p">=</span> <span class="s2">&#34;/images/avatar.png&#34;</span>
      <span class="c">#  主页显示的网站标题 (支持 HTML 格式)</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 主页显示的网站副标题</span>
      <span class="nx">subtitle</span> <span class="p">=</span> <span class="s2">&#34;这是我的全新 Hugo 网站&#34;</span>
      <span class="c"># 是否为副标题显示打字机动画</span>
      <span class="nx">typeit</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 是否显示社交账号</span>
      <span class="nx">social</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c">#  免责声明 (支持 HTML 格式)</span>
      <span class="nx">disclaimer</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c"># 主页文章列表</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">home</span><span class="p">.</span><span class="nx">posts</span><span class="p">]</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 主页每页显示文章数量</span>
      <span class="nx">paginate</span> <span class="p">=</span> <span class="mi">6</span>
      <span class="c">#  被 params.page 中的 hiddenFromHomePage 替代</span>
      <span class="c"># 当你没有在文章前置参数中设置 &#34;hiddenFromHomePage&#34; 时的默认行为</span>
      <span class="nx">defaultHiddenFromHomePage</span> <span class="p">=</span> <span class="kc">false</span>

  <span class="c"># 作者的社交信息设置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]</span>
    <span class="nx">GitHub</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
    <span class="nx">Linkedin</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Twitter</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
    <span class="nx">Instagram</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
    <span class="nx">Facebook</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
    <span class="nx">Telegram</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
    <span class="nx">Medium</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Gitlab</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Youtubelegacy</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Youtubecustom</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Youtubechannel</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Tumblr</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Quora</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Keybase</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Pinterest</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Reddit</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Codepen</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">FreeCodeCamp</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Bitbucket</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Stackoverflow</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Weibo</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Odnoklassniki</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">VK</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Flickr</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Xing</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Snapchat</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Soundcloud</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Spotify</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Bandcamp</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Paypal</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Fivehundredpx</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Mix</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Goodreads</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Lastfm</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Foursquare</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Hackernews</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Kickstarter</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Patreon</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Steam</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Twitch</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Strava</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Skype</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Whatsapp</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Zhihu</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Douban</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Angellist</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Slidershare</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Jsfiddle</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Deviantart</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Behance</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Dribbble</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Wordpress</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Vine</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Googlescholar</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Researchgate</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Mastodon</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Thingiverse</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Devto</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Gitea</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">XMPP</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Matrix</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Bilibili</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">Email</span> <span class="p">=</span> <span class="s2">&#34;xxxx@xxxx.com&#34;</span>
    <span class="nx">RSS</span> <span class="p">=</span> <span class="kc">true</span> <span class="c"># </span>

  <span class="c">#  文章页面配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">]</span>
    <span class="c">#  是否在主页隐藏一篇文章</span>
    <span class="nx">hiddenFromHomePage</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c">#  是否在搜索结果中隐藏一篇文章</span>
    <span class="nx">hiddenFromSearch</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c">#  是否使用 twemoji</span>
    <span class="nx">twemoji</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c"># 是否使用 lightgallery</span>
    <span class="nx">lightgallery</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c">#  是否使用 ruby 扩展语法</span>
    <span class="nx">ruby</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  是否使用 fraction 扩展语法</span>
    <span class="nx">fraction</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  是否使用 fontawesome 扩展语法</span>
    <span class="nx">fontawesome</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># 是否在文章页面显示原始 Markdown 文档链接</span>
    <span class="nx">linkToMarkdown</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  是否在 RSS 中显示全文内容</span>
    <span class="nx">rssFullText</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c">#  目录配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">toc</span><span class="p">]</span>
      <span class="c"># 是否使用目录</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c">#  是否保持使用文章前面的静态目录</span>
      <span class="nx">keepStatic</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 是否使侧边目录自动折叠展开</span>
      <span class="nx">auto</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  代码配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">code</span><span class="p">]</span>
      <span class="c"># 是否显示代码块的复制按钮</span>
      <span class="nx">copy</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 默认展开显示的代码行数</span>
      <span class="nx">maxShownLines</span> <span class="p">=</span> <span class="mi">10</span>
    <span class="c">#  KaTeX 数学公式</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">math</span><span class="p">]</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 默认块定界符是 $$ ... $$ 和 \\[ ... \\]</span>
      <span class="nx">blockLeftDelimiter</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">blockRightDelimiter</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 默认行内定界符是 $ ... $ 和 \\( ... \\)</span>
      <span class="nx">inlineLeftDelimiter</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">inlineRightDelimiter</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># KaTeX 插件 copy_tex</span>
      <span class="nx">copyTex</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># KaTeX 插件 mhchem</span>
      <span class="nx">mhchem</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  Mapbox GL JS 配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">mapbox</span><span class="p">]</span>
      <span class="c"># Mapbox GL JS 的 access token</span>
      <span class="nx">accessToken</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 浅色主题的地图样式</span>
      <span class="nx">lightStyle</span> <span class="p">=</span> <span class="s2">&#34;mapbox://styles/mapbox/light-v9&#34;</span>
      <span class="c"># 深色主题的地图样式</span>
      <span class="nx">darkStyle</span> <span class="p">=</span> <span class="s2">&#34;mapbox://styles/mapbox/dark-v9&#34;</span>
      <span class="c"># 是否添加 NavigationControl</span>
      <span class="nx">navigation</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 是否添加 GeolocateControl</span>
      <span class="nx">geolocate</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 是否添加 ScaleControl</span>
      <span class="nx">scale</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># 是否添加 FullscreenControl</span>
      <span class="nx">fullscreen</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c">#  文章页面的分享信息设置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">share</span><span class="p">]</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Twitter</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Facebook</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Linkedin</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Whatsapp</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Pinterest</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Tumblr</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">HackerNews</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Reddit</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">VK</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Buffer</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Xing</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Line</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Instapaper</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Pocket</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Digg</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Stumbleupon</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Flipboard</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Weibo</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Renren</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Myspace</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Blogger</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Baidu</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Odnoklassniki</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Evernote</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">Skype</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Trello</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="nx">Mix</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c">#  评论系统设置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">]</span>
      <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="c"># Disqus 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">disqus</span><span class="p">]</span>
        <span class="c"># </span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="c"># Disqus 的 shortname，用来在文章中启用 Disqus 评论系统</span>
        <span class="nx">shortname</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># Gitalk 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">gitalk</span><span class="p">]</span>
        <span class="c"># </span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">owner</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">repo</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">clientId</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">clientSecret</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># Valine 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">valine</span><span class="p">]</span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">appId</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">appKey</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">placeholder</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">avatar</span> <span class="p">=</span> <span class="s2">&#34;mp&#34;</span>
        <span class="nx">meta</span><span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">pageSize</span> <span class="p">=</span> <span class="mi">10</span>
        <span class="nx">lang</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">visitor</span> <span class="p">=</span> <span class="kc">true</span>
        <span class="nx">recordIP</span> <span class="p">=</span> <span class="kc">true</span>
        <span class="nx">highlight</span> <span class="p">=</span> <span class="kc">true</span>
        <span class="nx">enableQQ</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">serverURLs</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="c">#  emoji 数据文件名称, 默认是 &#34;google.yml&#34;</span>
        <span class="c"># (&#34;apple.yml&#34;, &#34;google.yml&#34;, &#34;facebook.yml&#34;, &#34;twitter.yml&#34;)</span>
        <span class="c"># 位于 &#34;themes/LoveIt/assets/data/emoji/&#34; 目录</span>
        <span class="c"># 可以在你的项目下相同路径存放你自己的数据文件:</span>
        <span class="c"># &#34;assets/data/emoji/&#34;</span>
        <span class="nx">emoji</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># Facebook 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">facebook</span><span class="p">]</span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">width</span> <span class="p">=</span> <span class="s2">&#34;100%&#34;</span>
        <span class="nx">numPosts</span> <span class="p">=</span> <span class="mi">10</span>
        <span class="nx">appId</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;zh_CN&#34;</span>
      <span class="c">#  Telegram Comments 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">telegram</span><span class="p">]</span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">siteID</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">limit</span> <span class="p">=</span> <span class="mi">5</span>
        <span class="nx">height</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">color</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">colorful</span> <span class="p">=</span> <span class="kc">true</span>
        <span class="nx">dislikes</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="nx">outlined</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="c">#  Commento 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">commento</span><span class="p">]</span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
      <span class="c">#  Utterances 评论系统设置</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">comment</span><span class="p">.</span><span class="nx">utterances</span><span class="p">]</span>
        <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
        <span class="c"># owner/repo</span>
        <span class="nx">repo</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">issueTerm</span> <span class="p">=</span> <span class="s2">&#34;pathname&#34;</span>
        <span class="nx">label</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">lightTheme</span> <span class="p">=</span> <span class="s2">&#34;github-light&#34;</span>
        <span class="nx">darkTheme</span> <span class="p">=</span> <span class="s2">&#34;github-dark&#34;</span>
    <span class="c">#  第三方库配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">library</span><span class="p">]</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">library</span><span class="p">.</span><span class="nx">css</span><span class="p">]</span>
        <span class="c"># someCSS = &#34;some.css&#34;</span>
        <span class="c"># 位于 &#34;assets/&#34;</span>
        <span class="c"># 或者</span>
        <span class="c"># someCSS = &#34;https://cdn.example.com/some.css&#34;</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">library</span><span class="p">.</span><span class="nx">js</span><span class="p">]</span>
        <span class="c"># someJavascript = &#34;some.js&#34;</span>
        <span class="c"># 位于 &#34;assets/&#34;</span>
        <span class="c"># 或者</span>
        <span class="c"># someJavascript = &#34;https://cdn.example.com/some.js&#34;</span>
    <span class="c">#  页面 SEO 配置</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">seo</span><span class="p">]</span>
      <span class="c"># 图片 URL</span>
      <span class="nx">images</span> <span class="p">=</span> <span class="p">[]</span>
      <span class="c"># 出版者信息</span>
      <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">page</span><span class="p">.</span><span class="nx">seo</span><span class="p">.</span><span class="nx">publisher</span><span class="p">]</span>
        <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
        <span class="nx">logoUrl</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  TypeIt 配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">typeit</span><span class="p">]</span>
    <span class="c"># 每一步的打字速度 (单位是毫秒)</span>
    <span class="nx">speed</span> <span class="p">=</span> <span class="mi">100</span>
    <span class="c"># 光标的闪烁速度 (单位是毫秒)</span>
    <span class="nx">cursorSpeed</span> <span class="p">=</span> <span class="mi">1000</span>
    <span class="c"># 光标的字符 (支持 HTML 格式)</span>
    <span class="nx">cursorChar</span> <span class="p">=</span> <span class="s2">&#34;|&#34;</span>
    <span class="c"># 打字结束之后光标的持续时间 (单位是毫秒, &#34;-1&#34; 代表无限大)</span>
    <span class="nx">duration</span> <span class="p">=</span> <span class="mi">-1</span>

  <span class="c"># 网站验证代码，用于 Google/Bing/Yandex/Pinterest/Baidu</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">verification</span><span class="p">]</span>
    <span class="nx">google</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">bing</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">yandex</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">pinterest</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">baidu</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  网站 SEO 配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">seo</span><span class="p">]</span>
    <span class="c"># 图片 URL</span>
    <span class="nx">image</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="c"># 缩略图 URL</span>
    <span class="nx">thumbnailUrl</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  网站分析配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">analytics</span><span class="p">]</span>
    <span class="nx">enable</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c"># Google Analytics</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">analytics</span><span class="p">.</span><span class="nx">google</span><span class="p">]</span>
      <span class="nx">id</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 是否匿名化用户 IP</span>
      <span class="nx">anonymizeIP</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># Fathom Analytics</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">analytics</span><span class="p">.</span><span class="nx">fathom</span><span class="p">]</span>
      <span class="nx">id</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="c"># 自行托管追踪器时的主机路径</span>
      <span class="nx">server</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  Cookie 许可配置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">cookieconsent</span><span class="p">]</span>
    <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># 用于 Cookie 许可横幅的文本字符串</span>
    <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">cookieconsent</span><span class="p">.</span><span class="nx">content</span><span class="p">]</span>
      <span class="nx">message</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">dismiss</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">link</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  第三方库文件的 CDN 设置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">cdn</span><span class="p">]</span>
    <span class="c"># CDN 数据文件名称, 默认不启用</span>
    <span class="c"># (&#34;jsdelivr.yml&#34;)</span>
    <span class="c"># 位于 &#34;themes/LoveIt/assets/data/cdn/&#34; 目录</span>
    <span class="c"># 可以在你的项目下相同路径存放你自己的数据文件:</span>
    <span class="c"># &#34;assets/data/cdn/&#34;</span>
    <span class="nx">data</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

  <span class="c">#  兼容性设置</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">compatibility</span><span class="p">]</span>
    <span class="c"># 是否使用 Polyfill.io 来兼容旧式浏览器</span>
    <span class="nx">polyfill</span> <span class="p">=</span> <span class="kc">false</span>
    <span class="c"># 是否使用 object-fit-images 来兼容旧式浏览器</span>
    <span class="nx">objectFit</span> <span class="p">=</span> <span class="kc">false</span>

<span class="c"># Hugo 解析文档的配置</span>
<span class="p">[</span><span class="nx">markup</span><span class="p">]</span>
  <span class="c"># 语法高亮设置</span>
  <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">highlight</span><span class="p">]</span>
    <span class="nx">codeFences</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="nx">guessSyntax</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="nx">lineNos</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="nx">lineNumbersInTable</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="c"># false 是必要的设置</span>
    <span class="c"># (https://github.com/dillonzq/LoveIt/issues/158)</span>
    <span class="nx">noClasses</span> <span class="p">=</span> <span class="kc">false</span>
  <span class="c"># Goldmark 是 Hugo 0.60 以来的默认 Markdown 解析库</span>
  <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">]</span>
    <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">extensions</span><span class="p">]</span>
      <span class="nx">definitionList</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">footnote</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">linkify</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">strikethrough</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">table</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">taskList</span> <span class="p">=</span> <span class="kc">true</span>
      <span class="nx">typographer</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">goldmark</span><span class="p">.</span><span class="nx">renderer</span><span class="p">]</span>
      <span class="c"># 是否在文档中直接使用 HTML 标签</span>
      <span class="nx">unsafe</span> <span class="p">=</span> <span class="kc">true</span>
  <span class="c"># 目录设置</span>
  <span class="p">[</span><span class="nx">markup</span><span class="p">.</span><span class="nx">tableOfContents</span><span class="p">]</span>
    <span class="nx">startLevel</span> <span class="p">=</span> <span class="mi">2</span>
    <span class="nx">endLevel</span> <span class="p">=</span> <span class="mi">6</span>

<span class="c"># 作者配置</span>
<span class="p">[</span><span class="nx">author</span><span class="p">]</span>
  <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;xxxx&#34;</span>
  <span class="nx">email</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
  <span class="nx">link</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

<span class="c"># 网站地图配置</span>
<span class="p">[</span><span class="nx">sitemap</span><span class="p">]</span>
  <span class="nx">changefreq</span> <span class="p">=</span> <span class="s2">&#34;weekly&#34;</span>
  <span class="nx">filename</span> <span class="p">=</span> <span class="s2">&#34;sitemap.xml&#34;</span>
  <span class="nx">priority</span> <span class="p">=</span> <span class="mf">0.5</span>

<span class="c"># Permalinks 配置</span>
<span class="p">[</span><span class="nx">Permalinks</span><span class="p">]</span>
  <span class="c"># posts = &#34;:year/:month/:filename&#34;</span>
  <span class="nx">posts</span> <span class="p">=</span> <span class="s2">&#34;:filename&#34;</span>

<span class="c"># 隐私信息配置</span>
<span class="p">[</span><span class="nx">privacy</span><span class="p">]</span>
  <span class="c">#  Google Analytics 相关隐私 (被 params.analytics.google 替代)</span>
  <span class="p">[</span><span class="nx">privacy</span><span class="p">.</span><span class="nx">googleAnalytics</span><span class="p">]</span>
    <span class="c"># ...</span>
  <span class="p">[</span><span class="nx">privacy</span><span class="p">.</span><span class="nx">twitter</span><span class="p">]</span>
    <span class="nx">enableDNT</span> <span class="p">=</span> <span class="kc">true</span>
  <span class="p">[</span><span class="nx">privacy</span><span class="p">.</span><span class="nx">youtube</span><span class="p">]</span>
    <span class="nx">privacyEnhanced</span> <span class="p">=</span> <span class="kc">true</span>

<span class="c"># 用于输出 Markdown 格式文档的设置</span>
<span class="p">[</span><span class="nx">mediaTypes</span><span class="p">]</span>
  <span class="p">[</span><span class="nx">mediaTypes</span><span class="p">.</span><span class="s2">&#34;text/plain&#34;</span><span class="p">]</span>
    <span class="nx">suffixes</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;md&#34;</span><span class="p">]</span>

<span class="c"># 用于输出 Markdown 格式文档的设置</span>
<span class="p">[</span><span class="nx">outputFormats</span><span class="p">.</span><span class="nx">MarkDown</span><span class="p">]</span>
  <span class="nx">mediaType</span> <span class="p">=</span> <span class="s2">&#34;text/plain&#34;</span>
  <span class="nx">isPlainText</span> <span class="p">=</span> <span class="kc">true</span>
  <span class="nx">isHTML</span> <span class="p">=</span> <span class="kc">false</span>

<span class="c"># 用于 Hugo 输出文档的设置</span>
<span class="p">[</span><span class="nx">outputs</span><span class="p">]</span>
  <span class="c"># </span>
  <span class="nx">home</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;JSON&#34;</span><span class="p">]</span>
  <span class="nx">page</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;MarkDown&#34;</span><span class="p">]</span>
  <span class="nx">section</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">]</span>
  <span class="nx">taxonomy</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">]</span>
  <span class="nx">taxonomyTerm</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">]</span>

</code></pre></td></tr></table>
</div>
</div><blockquote>
<p>请注意, 本文档其他部分将详细解释其中一些参数.</p>
</blockquote>
<h4 id="342-hugo的运行环境">3.4.2 Hugo的运行环境</h4>
<p><code>hugo serve</code> 的默认运行环境是 <code>development</code>, 而 <code>hugo</code> 的默认运行环境是 <code>production</code>.</p>
<p>由于本地 <code>development</code> 环境的限制, <strong>评论系统</strong>, <strong>CDN</strong> 和 <strong>fingerprint</strong> 不会在 <code>development</code> 环境下启用.</p>
<p>你可以使用 <code>hugo serve -e production</code> 命令来开启这些特性.</p>
<h4 id="343-cnd配置技巧">3.4.3 CND配置技巧</h4>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">cdn</span><span class="p">]</span>
  <span class="c"># CDN 数据文件名称, 默认不启用</span>
  <span class="c"># (&#34;jsdelivr.yml&#34;)</span>
  <span class="nx">data</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

</code></pre></td></tr></table>
</div>
</div><blockquote>
<p>默认的 CDN 数据文件位于 <code>themes/LoveIt/assets/data/cdn/</code> 目录. 可以在你的项目下相同路径存放你自己的数据文件: <code>assets/data/cdn/</code>.</p>
</blockquote>
<h4 id="344-关于社交链接配置的技巧">3.4.4 关于社交链接配置的技巧</h4>
<p>你可以直接配置你的社交 ID 来生成一个默认社交链接和图标:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]</span>
  <span class="nx">Mastodon</span> <span class="p">=</span> <span class="s2">&#34;@xxxx&#34;</span>

</code></pre></td></tr></table>
</div>
</div><p>生成的社交链接是 <code>https://mastodon.technology/@xxxx</code>.</p>
<p>或者你可以通过一个字典来设置更多的选项:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">]</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">social</span><span class="p">.</span><span class="nx">Mastodon</span><span class="p">]</span>
    <span class="c"># 排列图标时的权重 (权重越大, 图标的位置越靠后)</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">0</span>
    <span class="c"># 你的社交 ID</span>
    <span class="nx">id</span> <span class="p">=</span> <span class="s2">&#34;@xxxx&#34;</span>
    <span class="c"># 你的社交链接的前缀</span>
    <span class="nx">prefix</span> <span class="p">=</span> <span class="s2">&#34;https://mastodon.social/&#34;</span>
    <span class="c"># 当鼠标停留在图标上时的提示内容</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;Mastodon&#34;</span>

</code></pre></td></tr></table>
</div>
</div><p>所有支持的社交链接的默认数据位于 <code>themes/LoveIt/assets/data/social.yaml</code>. 你可以参考它来配置你的社交链接.</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021346090.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021346090.png, https://gitee.com/lizilong1993/image/raw/master/202111021346090.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021346090.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021346090.png"
        title="image-20211102134637992" /></p>
<h4 id="345-网站图标-浏览器配置-网站清单">3.4.5 网站图标, 浏览器配置, 网站清单</h4>
<p>强烈建议你把:</p>
<ul>
<li>apple-touch-icon.png (180x180)</li>
<li>favicon-32x32.png (32x32)</li>
<li>favicon-16x16.png (16x16)</li>
<li>mstile-150x150.png (150x150)</li>
<li>android-chrome-192x192.png (192x192)</li>
<li>android-chrome-512x512.png (512x512)</li>
</ul>
<p>放在 <code>/static</code> 目录. 利用 <a href="https://realfavicongenerator.net/" target="_blank" rel="noopener noreffer">https://realfavicongenerator.net/</a> 可以很容易地生成这些文件.</p>
<p>可以自定义 <code>browserconfig.xml</code> 和 <code>site.webmanifest</code> 文件来设置 theme-color 和 background-color.</p>
<h4 id="346-自定义样式">3.4.6 自定义样式</h4>
<blockquote>
<p>Hugo <strong>extended</strong> 版本对于自定义样式是必需的.</p>
</blockquote>
<p>通过定义自定义 <code>.scss</code> 样式文件, <strong>LoveIt</strong> 主题支持可配置的样式.</p>
<p>包含自定义 <code>.scss</code> 样式文件的目录相对于 <strong>你的项目根目录</strong> 的路径为 <code>assets/css</code>.</p>
<p>在 <code>assets/css/_override.scss</code> 中, 你可以覆盖 <code>themes/LoveIt/assets/css/_variables.scss</code> 中的变量以自定义样式.</p>
<p>这是一个例子:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-scss" data-lang="scss"><span class="k">@import</span> <span class="sx">url(&#39;https://fonts.googleapis.com/css?family=Fira+Mono:400,700&amp;display=swap&amp;subset=latin-ext&#39;)</span><span class="p">;</span>
<span class="nv">$code-font-family</span><span class="o">:</span> <span class="n">Fira</span> <span class="n">Mono</span><span class="o">,</span> <span class="n">Source</span> <span class="n">Code</span> <span class="n">Pro</span><span class="o">,</span> <span class="n">Menlo</span><span class="o">,</span> <span class="n">Consolas</span><span class="o">,</span> <span class="n">Monaco</span><span class="o">,</span> <span class="ni">monospace</span><span class="p">;</span>

</code></pre></td></tr></table>
</div>
</div><p>在 <code>assets/css/_custom.scss</code> 中, 你可以添加一些 CSS 样式代码以自定义样式.</p>
<h3 id="multilanguage">3.5. 多语言和 i18n</h3>
<p><strong>LoveIt</strong> 主题完全兼容 Hugo 的多语言模式, 并且支持在网页上切换语言.</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021353959.gif"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021353959.gif, https://gitee.com/lizilong1993/image/raw/master/202111021353959.gif 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021353959.gif 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021353959.gif"
        title="language-switch.gif (770×226) (hugoloveit.com)" /></p>
<h4 id="351-兼容性">3.5.1 兼容性</h4>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021352693.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021352693.png, https://gitee.com/lizilong1993/image/raw/master/202111021352693.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021352693.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021352693.png"
        title="image-20211102135224621" /></p>
<h4 id="352-基本配置">3.5.2 基本配置</h4>
<p>学习了 <a href="https://gohugo.io/content-management/multilingual" target="_blank" rel="noopener noreffer">Hugo如何处理多语言网站</a> 之后, 请在 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/#site-configuration" target="_blank" rel="noopener noreffer">站点配置</a> 中定义你的网站语言.</p>
<p>例如, 一个支持英语, 中文和法语的网站配置:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span><span class="lnt">54
</span><span class="lnt">55
</span><span class="lnt">56
</span><span class="lnt">57
</span><span class="lnt">58
</span><span class="lnt">59
</span><span class="lnt">60
</span><span class="lnt">61
</span><span class="lnt">62
</span><span class="lnt">63
</span><span class="lnt">64
</span><span class="lnt">65
</span><span class="lnt">66
</span><span class="lnt">67
</span><span class="lnt">68
</span><span class="lnt">69
</span><span class="lnt">70
</span><span class="lnt">71
</span><span class="lnt">72
</span><span class="lnt">73
</span><span class="lnt">74
</span><span class="lnt">75
</span><span class="lnt">76
</span><span class="lnt">77
</span><span class="lnt">78
</span><span class="lnt">79
</span><span class="lnt">80
</span><span class="lnt">81
</span><span class="lnt">82
</span><span class="lnt">83
</span><span class="lnt">84
</span><span class="lnt">85
</span><span class="lnt">86
</span><span class="lnt">87
</span><span class="lnt">88
</span><span class="lnt">89
</span><span class="lnt">90
</span><span class="lnt">91
</span><span class="lnt">92
</span><span class="lnt">93
</span><span class="lnt">94
</span><span class="lnt">95
</span><span class="lnt">96
</span><span class="lnt">97
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="c"># [en, zh-cn, fr, pl, ...] 设置默认的语言</span>
<span class="nx">defaultContentLanguage</span> <span class="p">=</span> <span class="s2">&#34;zh-cn&#34;</span>

<span class="p">[</span><span class="nx">languages</span><span class="p">]</span>
  <span class="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">]</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;My New Hugo Site&#34;</span>
    <span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;en&#34;</span>
    <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">&#34;English&#34;</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;posts&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Posts&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/posts/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;tags&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Tags&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/tags/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">2</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">en</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;categories&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Categories&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/categories/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">3</span>

  <span class="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">zh-cn</span><span class="p">]</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">2</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;我的全新 Hugo 网站&#34;</span>
    <span class="c"># 网站语言, 仅在这里 CN 大写</span>
    <span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;zh-CN&#34;</span>
    <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">&#34;简体中文&#34;</span>
    <span class="c"># 是否包括中日韩文字</span>
    <span class="nx">hasCJKLanguage</span> <span class="p">=</span> <span class="kc">true</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">zh-cn</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;posts&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;文章&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/posts/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">zh-cn</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;tags&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;标签&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/tags/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">2</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">zh-cn</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;categories&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;分类&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/categories/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">3</span>

  <span class="p">[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">fr</span><span class="p">]</span>
    <span class="nx">weight</span> <span class="p">=</span> <span class="mi">3</span>
    <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;Mon nouveau site Hugo&#34;</span>
    <span class="nx">languageCode</span> <span class="p">=</span> <span class="s2">&#34;fr&#34;</span>
    <span class="nx">languageName</span> <span class="p">=</span> <span class="s2">&#34;Français&#34;</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">fr</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;posts&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Postes&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/posts/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">1</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">fr</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;tags&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Balises&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/tags/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">2</span>
    <span class="p">[[</span><span class="nx">languages</span><span class="p">.</span><span class="nx">fr</span><span class="p">.</span><span class="nx">menu</span><span class="p">.</span><span class="nx">main</span><span class="p">]]</span>
      <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;categories&#34;</span>
      <span class="nx">pre</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">post</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">name</span> <span class="p">=</span> <span class="s2">&#34;Catégories&#34;</span>
      <span class="nx">url</span> <span class="p">=</span> <span class="s2">&#34;/categories/&#34;</span>
      <span class="nx">title</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
      <span class="nx">weight</span> <span class="p">=</span> <span class="mi">3</span>

</code></pre></td></tr></table>
</div>
</div><p>然后, 对于每个新页面, 将语言代码附加到文件名中.</p>
<p>单个文件 <code>my-page.md</code> 需要分为三个文件:</p>
<ul>
<li>英语: <code>my-page.en.md</code></li>
<li>中文: <code>my-page.zh-cn.md</code></li>
<li>法语: <code>my-page.fr.md</code></li>
</ul>
<blockquote>
<p>请注意, 菜单中仅显示翻译的页面. 它不会替换为默认语言内容.</p>
</blockquote>
<blockquote>
<p>Tips: 也可以使用 <a href="https://gohugo.io/content-management/multilingual#translate-your-content" target="_blank" rel="noopener noreffer">文章前置参数</a> 来翻译网址.</p>
</blockquote>
<h4 id="353-修改默认的翻译字符串">3.5.3 修改默认的翻译字符串</h4>
<p>翻译字符串用于在主题中使用的常见默认值. 目前提供<a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/#language-compatibility" target="_blank" rel="noopener noreffer">一些语言</a>的翻译, 但你可能自定义其他语言或覆盖默认值.</p>
<p>要覆盖默认值, 请在你项目的 i18n 目录 <code>i18n/&lt;languageCode&gt;.toml</code> 中创建一个新文件，并从 <code>themes/LoveIt/i18n/en.toml</code> 中获得提示.</p>
<p>另外, 由于你的翻译可能会帮助到其他人, 请花点时间通过 <a href="https://github.com/dillonzq/LoveIt/pulls" target="_blank" rel="noopener noreffer"> 创建一个 PR</a> 来贡献主题翻译, 谢谢!</p>
<h3 id="search">3.6. 搜索</h3>
<p>基于 <a href="https://lunrjs.com/" target="_blank" rel="noopener noreffer">Lunr.js</a> 或 <a href="https://www.algolia.com/" target="_blank" rel="noopener noreffer">algolia</a>, <strong>LoveIt</strong> 主题支持搜索功能.</p>
<h4 id="361-输出配置">3.6.1 输出配置</h4>
<p>为了生成搜索功能所需要的 <code>index.json</code>, 请在你的 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中添加 <code>JSON</code> 输出文件类型到 <code>outputs</code> 部分的 <code>home</code> 字段中.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">outputs</span><span class="p">]</span>
  <span class="nx">home</span> <span class="p">=</span> <span class="p">[</span><span class="s2">&#34;HTML&#34;</span><span class="p">,</span> <span class="s2">&#34;RSS&#34;</span><span class="p">,</span> <span class="s2">&#34;JSON&#34;</span><span class="p">]</span>

</code></pre></td></tr></table>
</div>
</div><h4 id="362-搜索配置">3.6.2 搜索配置</h4>
<p>基于 Hugo 生成的 <code>index.json</code> 文件, 你可以激活搜索功能.</p>
<p>这是你的 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的搜索部分:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">search</span><span class="p">]</span>
  <span class="nx">enable</span> <span class="p">=</span> <span class="kc">true</span>
  <span class="c"># 搜索引擎的类型 (&#34;lunr&#34;, &#34;algolia&#34;)</span>
  <span class="nx">type</span> <span class="p">=</span> <span class="s2">&#34;lunr&#34;</span>
  <span class="c"># 文章内容最长索引长度</span>
  <span class="nx">contentLength</span> <span class="p">=</span> <span class="mi">4000</span>
  <span class="c"># 搜索框的占位提示语</span>
  <span class="nx">placeholder</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
  <span class="c">#  最大结果数目</span>
  <span class="nx">maxResultLength</span> <span class="p">=</span> <span class="mi">10</span>
  <span class="c">#  结果内容片段长度</span>
  <span class="nx">snippetLength</span> <span class="p">=</span> <span class="mi">50</span>
  <span class="c">#  搜索结果中高亮部分的 HTML 标签</span>
  <span class="nx">highlightTag</span> <span class="p">=</span> <span class="s2">&#34;em&#34;</span>
  <span class="c">#  是否在搜索索引中使用基于 baseURL 的绝对路径</span>
  <span class="nx">absoluteURL</span> <span class="p">=</span> <span class="kc">false</span>
  <span class="p">[</span><span class="nx">params</span><span class="p">.</span><span class="nx">search</span><span class="p">.</span><span class="nx">algolia</span><span class="p">]</span>
    <span class="nx">index</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">appID</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>
    <span class="nx">searchKey</span> <span class="p">=</span> <span class="s2">&#34;&#34;</span>

</code></pre></td></tr></table>
</div>
</div><blockquote>
<p><strong>怎样选择搜索引擎?</strong></p>
<p>以下是两种搜索引擎的对比:</p>
<ul>
<li><code>lunr</code>: 简单, 无需同步 <code>index.json</code>, 没有 <code>contentLength</code> 的限制, 但占用带宽大且性能低 (特别是中文需要一个较大的分词依赖库)</li>
<li><code>algolia</code>: 高性能并且占用带宽低, 但需要同步 <code>index.json</code> 且有 <code>contentLength</code> 的限制</li>
</ul>
<p>文章内容被 <code>h2</code> 和 <code>h3</code> HTML 标签切分来提高查询效果并且基本实现全文搜索. <code>contentLength</code> 用来限制 <code>h2</code> 和 <code>h3</code> HTML 标签开头的内容部分的最大长度.</p>
</blockquote>
<blockquote>
<p><strong>关于 algolia 的使用技巧</strong></p>
<p>你需要上传 <code>index.json</code> 到 algolia 来激活搜索功能. 你可以使用浏览器来上传 <code>index.json</code> 文件但是一个自动化的脚本可能效果更好. <a href="https://github.com/chrisdmacrae/atomic-algolia" target="_blank" rel="noopener noreffer">Algolia Atomic</a> 是一个不错的选择. 为了兼容 Hugo 的多语言模式, 你需要上传不同语言的 <code>index.json</code> 文件到对应的 algolia index, 例如 <code>zh-cn/index.json</code> 或 <code>fr/index.json</code>…</p>
</blockquote>
<h2 id="page">4 页面组织</h2>
<h3 id="41-内容组织">4.1 内容组织</h3>
<p>以下是一些方便你清晰管理和生成文章的目录结构建议:</p>
<ul>
<li>保持博客文章存放在 <code>content/posts</code> 目录, 例如: <code>content/posts/我的第一篇文章.md</code></li>
<li>保持简单的静态页面存放在 <code>content</code> 目录, 例如: <code>content/about.md</code></li>
<li>本地资源组织</li>
</ul>
<blockquote>
<p><strong>本地资源引用</strong></p>
<p>有三种方法来引用<strong>图片</strong>和<strong>音乐</strong>等本地资源:</p>
<ol>
<li>使用<a href="https://gohugo.io/content-management/page-bundles/" target="_blank" rel="noopener noreffer">页面包</a>中的<a href="https://gohugo.io/content-management/page-resources/" target="_blank" rel="noopener noreffer">页面资源</a>. 你可以使用适用于 <code>Resources.GetMatch</code> 的值或者直接使用相对于当前页面目录的文件路径来引用页面资源.</li>
<li>将本地资源放在 <strong>assets</strong> 目录中, 默认路径是 <code>/assets</code>. 引用资源的文件路径是相对于 assets 目录的.</li>
<li>将本地资源放在 <strong>static</strong> 目录中, 默认路径是 <code>/static</code>. 引用资源的文件路径是相对于 static 目录的.</li>
</ol>
<p>引用的<strong>优先级</strong>符合以上的顺序.</p>
<p>在这个主题中的很多地方可以使用上面的本地资源引用, 例如 <strong>链接</strong>, <strong>图片</strong>, <code>image</code> shortcode, <code>music</code> shortcode 和<strong>前置参数</strong>中的部分参数.</p>
<p>页面资源或者 <strong>assets</strong> 目录中的<a href="https://gohugo.io/content-management/image-processing/" target="_blank" rel="noopener noreffer">图片处理</a>会在未来的版本中得到支持. 非常酷的功能! 😄</p>
</blockquote>
<h3 id="42-前置参数">4.2 前置参数</h3>
<p><strong>Hugo</strong> 允许你在文章内容前面添加 <code>yaml</code>, <code>toml</code> 或者 <code>json</code> 格式的前置参数.</p>
<blockquote>
<p><strong>注意</strong></p>
<p><strong>不是所有</strong>的以下前置参数都必须在你的每篇文章中设置. 只有在文章的参数和你的 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站设置</a> 中的 <code>page</code> 部分不一致时才有必要这么做.</p>
</blockquote>
<p>这是一个前置参数例子:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span><span class="lnt">27
</span><span class="lnt">28
</span><span class="lnt">29
</span><span class="lnt">30
</span><span class="lnt">31
</span><span class="lnt">32
</span><span class="lnt">33
</span><span class="lnt">34
</span><span class="lnt">35
</span><span class="lnt">36
</span><span class="lnt">37
</span><span class="lnt">38
</span><span class="lnt">39
</span><span class="lnt">40
</span><span class="lnt">41
</span><span class="lnt">42
</span><span class="lnt">43
</span><span class="lnt">44
</span><span class="lnt">45
</span><span class="lnt">46
</span><span class="lnt">47
</span><span class="lnt">48
</span><span class="lnt">49
</span><span class="lnt">50
</span><span class="lnt">51
</span><span class="lnt">52
</span><span class="lnt">53
</span><span class="lnt">54
</span><span class="lnt">55
</span><span class="lnt">56
</span><span class="lnt">57
</span><span class="lnt">58
</span><span class="lnt">59
</span><span class="lnt">60
</span><span class="lnt">61
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="nn">---</span><span class="w">
</span><span class="w"></span><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;我的第一篇文章&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">subtitle</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">date</span><span class="p">:</span><span class="w"> </span><span class="ld">2020-03-04T15:58:26</span><span class="m">+08</span><span class="p">:</span><span class="m">00</span><span class="w">
</span><span class="w"></span><span class="nt">lastmod</span><span class="p">:</span><span class="w"> </span><span class="ld">2020-03-04T15:58:26</span><span class="m">+08</span><span class="p">:</span><span class="m">00</span><span class="w">
</span><span class="w"></span><span class="nt">draft</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">author</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">authorLink</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">description</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">license</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">images</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span><span class="w">
</span><span class="w"></span><span class="nt">tags</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span><span class="w"></span><span class="nt">categories</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span><span class="w"></span><span class="nt">featuredImage</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">featuredImagePreview</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w">
</span><span class="w"></span><span class="nt">hiddenFromHomePage</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="w"></span><span class="nt">hiddenFromSearch</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="w"></span><span class="nt">twemoji</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="w"></span><span class="nt">lightgallery</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">ruby</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">fraction</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">fontawesome</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">linkToMarkdown</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">rssFullText</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span><span class="w">
</span><span class="w"></span><span class="nt">toc</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">enable</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w">  </span><span class="nt">auto</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w"></span><span class="nt">code</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">copy</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nt">math</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">enable</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nt">mapbox</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">accessToken</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;&#34;</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nt">share</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">enable</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nt">comment</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">enable</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nt">library</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">css</span><span class="p">:</span><span class="w">
</span><span class="w">    </span><span class="c"># someCSS = &#34;some.css&#34;</span><span class="w">
</span><span class="w">    </span><span class="c"># 位于 &#34;assets/&#34;</span><span class="w">
</span><span class="w">    </span><span class="c"># 或者</span><span class="w">
</span><span class="w">    </span><span class="c"># someCSS = &#34;https://cdn.example.com/some.css&#34;</span><span class="w">
</span><span class="w">  </span><span class="nt">js</span><span class="p">:</span><span class="w">
</span><span class="w">    </span><span class="c"># someJS = &#34;some.js&#34;</span><span class="w">
</span><span class="w">    </span><span class="c"># 位于 &#34;assets/&#34;</span><span class="w">
</span><span class="w">    </span><span class="c"># 或者</span><span class="w">
</span><span class="w">    </span><span class="c"># someJS = &#34;https://cdn.example.com/some.js&#34;</span><span class="w">
</span><span class="w"></span><span class="nt">seo</span><span class="p">:</span><span class="w">
</span><span class="w">  </span><span class="nt">images</span><span class="p">:</span><span class="w"> </span><span class="p">[]</span><span class="w">
</span><span class="w">  </span><span class="c"># ...</span><span class="w">
</span><span class="w"></span><span class="nn">---</span><span class="w">
</span><span class="w">
</span></code></pre></td></tr></table>
</div>
</div><ul>
<li><strong>title</strong>: 文章标题.</li>
<li><strong>subtitle</strong>:文章副标题.</li>
<li><strong>date</strong>: 这篇文章创建的日期时间. 它通常是从文章的前置参数中的 <code>date</code> 字段获取的, 但是也可以在 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中设置.</li>
<li><strong>lastmod</strong>: 上次修改内容的日期时间.</li>
<li><strong>draft</strong>: 如果设为 <code>true</code>, 除非 <code>hugo</code> 命令使用了 <code>--buildDrafts</code>/<code>-D</code> 参数, 这篇文章不会被渲染.</li>
<li><strong>author</strong>: 文章作者.</li>
<li><strong>authorLink</strong>: 文章作者的链接.</li>
<li><strong>description</strong>: 文章内容的描述.</li>
<li><strong>license</strong>: 这篇文章特殊的许可.</li>
<li><strong>images</strong>: 页面图片, 用于 Open Graph 和 Twitter Cards.</li>
<li><strong>tags</strong>: 文章的标签.</li>
<li><strong>categories</strong>: 文章所属的类别.</li>
<li><strong>featuredImage</strong>: 文章的特色图片.</li>
<li><strong>featuredImagePreview</strong>: 用在主页预览的文章特色图片.</li>
<li><strong>hiddenFromHomePage</strong>: 如果设为 <code>true</code>, 这篇文章将不会显示在主页上.</li>
<li><strong>hiddenFromSearch</strong>: 如果设为 <code>true</code>, 这篇文章将不会显示在搜索结果中.</li>
<li><strong>twemoji</strong>:如果设为 <code>true</code>, 这篇文章会使用 twemoji.</li>
<li><strong>lightgallery</strong>: 如果设为 <code>true</code>, 文章中的图片将可以按照画廊形式呈现.</li>
<li><strong>ruby</strong>: 如果设为 <code>true</code>, 这篇文章会使用 <a href="https://hugoloveit.com/zh-cn/theme-documentation-content/#ruby" target="_blank" rel="noopener noreffer">上标注释扩展语法</a>.</li>
<li><strong>fraction</strong>:如果设为 <code>true</code>, 这篇文章会使用 <a href="https://hugoloveit.com/zh-cn/theme-documentation-content/#fraction" target="_blank" rel="noopener noreffer">分数扩展语法</a>.</li>
<li><strong>fontawesome</strong>: 如果设为 <code>true</code>, 这篇文章会使用 <a href="https://hugoloveit.com/zh-cn/theme-documentation-content/#fontawesome" target="_blank" rel="noopener noreffer">Font Awesome 扩展语法</a>.</li>
<li><strong>linkToMarkdown</strong>: 如果设为 <code>true</code>, 内容的页脚将显示指向原始 Markdown 文件的链接.</li>
<li><strong>rssFullText</strong>:如果设为 <code>true</code>, 在 RSS 中将会显示全文内容.</li>
<li><strong>toc</strong>: 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.toc</code> 部分相同.</li>
<li><strong>code</strong>:<a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.code</code> 部分相同.</li>
<li><strong>math</strong>:https://github.com/dillonzq/LoveIt/releases/tag/v0.2.0) 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.math</code> 部分相同.</li>
<li><strong>mapbox</strong>:和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.mapbox</code> 部分相同.</li>
<li><strong>share</strong>: 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.share</code> 部分相同.</li>
<li><strong>comment</strong>: 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.comment</code> 部分相同.</li>
<li><strong>library</strong>: 和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.library</code> 部分相同.</li>
<li><strong>seo</strong>:和 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中的 <code>params.page.seo</code> 部分相同.</li>
</ul>
<blockquote>
<p><strong>技巧</strong></p>
<p><strong>featuredImage</strong> 和 <strong>featuredImagePreview</strong> 支持<a href="https://hugoloveit.com/zh-cn/theme-documentation-content/#contents-organization" target="_blank" rel="noopener noreffer">本地资源引用</a>的完整用法.</p>
<p>如果带有在前置参数中设置了 <code>name: featured-image</code> 或 <code>name: featured-image-preview</code> 属性的页面资源, 没有必要在设置 <code>featuredImage</code> 或 <code>featuredImagePreview</code>:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="nt">resources</span><span class="p">:</span><span class="w">
</span><span class="w"></span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">featured-image</span><span class="w">
</span><span class="w">  </span><span class="nt">src</span><span class="p">:</span><span class="w"> </span><span class="l">featured-image.jpg</span><span class="w">
</span><span class="w"></span>- <span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">featured-image-preview</span><span class="w">
</span><span class="w">  </span><span class="nt">src</span><span class="p">:</span><span class="w"> </span><span class="l">featured-image-preview.jpg</span><span class="w">
</span></code></pre></td></tr></table>
</div>
</div></blockquote>
<h3 id="43-内容摘要">4.3 内容摘要</h3>
<p><strong>LoveIt</strong> 主题使用内容摘要在主页中显示大致文章信息。Hugo 支持生成文章的摘要.</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021435473.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021435473.png, https://gitee.com/lizilong1993/image/raw/master/202111021435473.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021435473.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021435473.png"
        title="/zh-cn/theme-documentation-content/summary.zh-cn.png" /></p>
<h4 id="431-自动摘要拆分">4.3.1 自动摘要拆分</h4>
<p>默认情况下, Hugo 自动将内容的前 70 个单词作为摘要.</p>
<p>你可以通过在 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中设置 <code>summaryLength</code> 来自定义摘要长度.</p>
<p>如果您要使用 <strong>CJK中文/日语/韩语</strong> 语言创建内容, 并且想使用 Hugo 的自动摘要拆分功能，请在 <a href="https://hugoloveit.com/zh-cn/theme-documentation-basics#site-configuration" target="_blank" rel="noopener noreffer">网站配置</a> 中将 <code>hasCJKLanguage</code> 设置为 <code>true</code>.</p>
<h4 id="432-手动摘要拆分">4.3.2 手动摘要拆分</h4>
<p>另外, 你也可以添加 <code>&lt;!--more--&gt;</code> 摘要分割符来拆分文章生成摘要.</p>
<p>摘要分隔符之前的内容将用作该文章的摘要.</p>
<blockquote>
<p><strong>注意</strong></p>
<p>请小心输入<code>&lt;!--more--&gt;</code> ; 即全部为小写且没有空格.</p>
</blockquote>
<h4 id="433-前置参数摘要">4.3.3 前置参数摘要</h4>
<p>你可能希望摘要不是文章开头的文字. 在这种情况下, 你可以在文章前置参数的 <code>summary</code> 变量中设置单独的摘要.</p>
<h4 id="434-使用文章描述作为摘要">4.3.4 使用文章描述作为摘要</h4>
<p>你可能希望将文章前置参数中的 <code>description</code> 变量的内容作为摘要.</p>
<p>你仍然需要在文章开头添加 <code>&lt;!--more--&gt;</code> 摘要分割符. 将摘要分隔符之前的内容保留为空. 然后 <strong>LoveIt</strong> 主题会将你的文章描述作为摘要.</p>
<h4 id="435-摘要选择的优先级顺序">4.3.5 摘要选择的优先级顺序</h4>
<p>由于可以通过多种方式指定摘要, 因此了解顺序很有用. 如下:</p>
<ol>
<li>如果文章中有 <code>&lt;!--more--&gt;</code> 摘要分隔符, 但分隔符之前没有内容, 则使用描述作为摘要.</li>
<li>如果文章中有 <code>&lt;!--more--&gt;</code> 摘要分隔符, 则将按照手动摘要拆分的方法获得摘要.</li>
<li>如果文章前置参数中有摘要变量, 那么将以该值作为摘要.</li>
<li>按照自动摘要拆分方法.</li>
</ol>
<blockquote>
<p><strong>注意</strong></p>
<p>不建议在摘要内容中包含富文本块元素, 这会导致渲染错误. 例如代码块, 图片, 表格等.</p>
</blockquote>
<h2 id="function">5. 支持的功能</h2>
<h3 id="51-markdown基本语法">5.1 Markdown基本语法</h3>
<p>这部分内容将在<a href="" rel="">Markdown基本语法</a>中介绍。</p>
<h3 id="52-markdown扩展语法">5.2 Markdown扩展语法</h3>
<p>这部分内容将在<a href="" rel="">Markdown扩展语法</a>中介绍。</p>
<h3 id="53-emoji支持">5.3 Emoji支持</h3>
<p>这部分内容将在<a href="" rel="">Emoji支持</a>中介绍。</p>
<h3 id="54-数学公式">5.4 数学公式</h3>
<p>这部分内容将在<a href="" rel="">数学公式</a>中介绍。</p>
<h3 id="55-字符注音或者注释">5.5 字符注音或者注释</h3>
<p><strong>LoveIt</strong> 主题支持一种 <strong>字符注音或者注释</strong> Markdown 扩展语法:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><strong><ruby>Hugo<rt>一个开源的静态网站生成工具</rt></ruby></strong>

</code></pre></td></tr></table>
</div>
</div><p>呈现的输出效果如下:</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021448338.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021448338.png, https://gitee.com/lizilong1993/image/raw/master/202111021448338.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021448338.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021448338.png"
        title="image-20211102144803277" /></p>
<h3 id="56-分数">5.6 分数</h3>
<p><strong>LoveIt</strong> 主题支持一种 <strong>分数</strong> Markdown 扩展语法:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown"><sup>浅色</sup>/<sub>深色</sub>

<sup>99</sup>/<sub>100</sub>

</code></pre></td></tr></table>
</div>
</div><p>呈现的输出效果如下:</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021449024.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021449024.png, https://gitee.com/lizilong1993/image/raw/master/202111021449024.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021449024.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021449024.png"
        title="image-20211102144911965" /></p>
<h3 id="57-font-awesome">5.7 Font Awesome</h3>
<p><strong>LoveIt</strong> 主题使用 <a href="https://fontawesome.com/" target="_blank" rel="noopener noreffer">Font Awesome</a> 作为图标库. 你同样可以在文章中轻松使用这些图标.</p>
<p>从 <a href="https://fontawesome.com/icons?d=gallery" target="_blank" rel="noopener noreffer">Font Awesome 网站</a> 上获取所需的图标 <code>class</code>.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown">去露营啦! <i class="fas fa-campground fa-fw"></i>&nbsp;很快就回来.

真开心! <i class="far fa-grin-tears"></i>
</code></pre></td></tr></table>
</div>
</div><p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111021451377.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111021451377.png, https://gitee.com/lizilong1993/image/raw/master/202111021451377.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111021451377.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111021451377.png"
        title="image-20211102145139315" /></p>
<h3 id="58-转义字符">5.8 转义字符</h3>
<p>在某些特殊情况下 (编写这个主题文档时 ), 你的文章内容会与 Markdown 的基本或者扩展语法冲突, 并且无法避免.</p>
<p>转义字符语法可以帮助你渲染出想要的内容:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown">X -&gt; X
</code></pre></td></tr></table>
</div>
</div><p>例如, 两个 <code>:</code> 会启用 emoji 语法. 但有时候这不是你想要的结果. 可以像这样使用转义字符语法:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown">:joy:
</code></pre></td></tr></table>
</div>
</div><p>呈现的输出效果如下:</p>
<p>**:joy：**而不是 <strong>😂</strong></p>
<blockquote>
<p><strong>技巧</strong></p>
<p>这个方法可以间接解决一个还未解决的 <strong><a href="https://github.com/gohugoio/hugo/issues/4978" target="_blank" rel="noopener noreffer">Hugo 的 issue</a></strong>.</p>
</blockquote>
<p>另一个例子是:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-markdown" data-lang="markdown">[link](#escape-character)
</code></pre></td></tr></table>
</div>
</div><p>呈现的输出效果如下:</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111021456696.png" alt="image-20211102145603632" style="zoom: 67%;" />而不是 <strong><a href="https://hugoloveit.com/zh-cn/theme-documentation-content/#escape-character" target="_blank" rel="noopener noreffer">link</a></strong>.</p>
<h2 id="auto_push">6 自动化部署到Gitee</h2>
<h3 id="61新建仓库">6.1新建仓库</h3>
<p>访问Gitee官网https://gitee.com/，注册并登录。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111031728623.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111031728623.png, https://gitee.com/lizilong1993/image/raw/master/202111031728623.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111031728623.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111031728623.png"
        title="image-20211103164357931" /></p>
<p>点击<code>+</code>——&gt;<code>新建仓库</code>，填写你的仓库名称。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111031728537.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111031728537.png, https://gitee.com/lizilong1993/image/raw/master/202111031728537.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111031728537.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111031728537.png"
        title="image-20211103164529099" /></p>
<div class="details admonition warning open">
        <div class="details-summary admonition-title">
            <i class="icon fas fa-exclamation-triangle fa-fw"></i>注意<i class="details-icon fas fa-angle-right fa-fw"></i>
        </div>
        <div class="details-content">
            <div class="admonition-content">此处<code>仓库名称</code>和<code>路径</code>要填写一致，这样最后你的个人博客网址就会是https://yourname.gitee.io，否则会变成https://gitee.com/yourname.io。</div>
        </div>
    </div>
<h3 id="62-生成个人令牌">6.2 生成个人令牌</h3>
<p>点击个人头像，选择<code>设置</code>。</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111031649314.png" alt="image-20211103164955263" style="zoom:50%;" /></p>
<p>点击左侧菜单栏的<code>私人令牌</code>——&gt;<code>生成新令牌</code>。</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111031650537.png" alt="image-20211103165031488" style="zoom:50%;" /></p>
<p>输入令牌描述，所有选项都选上。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111031728644.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111031728644.png, https://gitee.com/lizilong1993/image/raw/master/202111031728644.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111031728644.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111031728644.png"
        title="image-20211103165302483" /></p>
<p>生成成功。</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111031653732.png" alt="image-20211103165344683" style="zoom: 50%;" /></p>
<div class="details admonition warning open">
        <div class="details-summary admonition-title">
            <i class="icon fas fa-exclamation-triangle fa-fw"></i>注意<i class="details-icon fas fa-angle-right fa-fw"></i>
        </div>
        <div class="details-content">
            <div class="admonition-content">个人令牌请单独存起来，因为Gitee将不会明文显示你的个人令牌。</div>
        </div>
    </div>
<h3 id="63-自动化部署">6.3 自动化部署</h3>
<div class="details admonition warning open">
        <div class="details-summary admonition-title">
            <i class="icon fas fa-exclamation-triangle fa-fw"></i>该方法已废弃<i class="details-icon fas fa-angle-right fa-fw"></i>
        </div>
        <div class="details-content">
            <div class="admonition-content">现已<strong>废弃</strong>该方法，采用<strong>2021/11/8日修改内容</strong>提到的方法。</div>
        </div>
    </div>
<p>新建一个文本文档，将如下内容写入。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash">::auto push code and posts to gitee


<span class="nb">echo</span> <span class="o">====</span>push code and posts to <span class="nv">gitee</span><span class="o">====</span>

<span class="nb">echo</span> start building
hugo

<span class="nb">echo</span> push code and posts to gitee remote branch code-hugo
git status
git add -u
git status
git commit -m <span class="s2">&#34;new posts&#34;</span>
git push  origin master:code-hugo
<span class="nb">echo</span> push the produced static blog website files to gitee remote branch master
<span class="nb">cd</span> ./public
git status
git add -u
git status
git commit -m <span class="s2">&#34;add posts&#34;</span>
git push  origin master

<span class="nb">echo</span> All work <span class="k">done</span>!

pause
</code></pre></td></tr></table>
</div>
</div><p>将文件后缀改为<code>*.bat</code>。每一行的意思可以看注释，大概流程是：</p>
<ul>
<li>
<p>构建</p>
</li>
<li>
<p>将工程代码push到远程仓库code-hugo分支</p>
</li>
<li>
<p>cd到 ./public文件夹</p>
</li>
<li>
<p>将生成的静态博客文件push到远程仓库master分支</p>
<div class="details admonition tip open">
        <div class="details-summary admonition-title">
            <i class="icon fas fa-lightbulb fa-fw"></i>2021/11/8修改<i class="details-icon fas fa-angle-right fa-fw"></i>
        </div>
        <div class="details-content">
            <div class="admonition-content"><p>现已<strong>修改</strong>为同时提交public文件夹和整个工程文件到不同的两个仓库，这样更方便对源码和博客分别进行管理。</p>
<p>具体方式参考<a href="https://blog.csdn.net/kutawei/article/details/105421545" target="_blank" rel="noopener noreffer">使用Hugo在GitHub上搭建个人博客初步_kutawei的博客-CSDN博客</a><code>第五步</code>。</p>
<ol>
<li>按照上述博文<code>第五步</code>进行操作</li>
<li>新建<code>deploy_blog.sh</code>和<code>自动化部署.bat</code>两个文件</li>
<li><code>deploy_blog.sh</code>内写入</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span><span class="lnt">20
</span><span class="lnt">21
</span><span class="lnt">22
</span><span class="lnt">23
</span><span class="lnt">24
</span><span class="lnt">25
</span><span class="lnt">26
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="cp">#!/bin/sh
</span><span class="cp"></span> 
<span class="c1"># If a command fails then the deploy stops</span>
<span class="nb">set</span> -e
 
<span class="nb">printf</span> <span class="s2">&#34;\033[0;32mDeploying updates to Gitee...\033[0m\n&#34;</span>
 
<span class="c1"># Build the project.</span>
hugo -D <span class="c1"># if using a theme, replace with `hugo -t &lt;YOURTHEME&gt;`</span>
 
<span class="c1"># Go To Public folder</span>

 
<span class="c1"># Add changes to git.</span>
git add .
 
<span class="c1"># Commit changes.</span>
<span class="nv">msg</span><span class="o">=</span><span class="s2">&#34;rebuilding site </span><span class="k">$(</span>date<span class="k">)</span><span class="s2">&#34;</span>
<span class="k">if</span> <span class="o">[</span> -n <span class="s2">&#34;</span><span class="nv">$*</span><span class="s2">&#34;</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span>
    <span class="nv">msg</span><span class="o">=</span><span class="s2">&#34;</span><span class="nv">$*</span><span class="s2">&#34;</span>
<span class="k">fi</span>
git commit -m <span class="s2">&#34;</span><span class="nv">$msg</span><span class="s2">&#34;</span>
 
<span class="c1"># Push source and build repos.</span>
git push origin master

</code></pre></td></tr></table>
</div>
</div><ol start="4">
<li><code>自动化部署.bat</code>写入内容</li>
</ol>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="nb">echo</span> <span class="o">=====</span>deploy to <span class="nv">gitee</span><span class="o">====</span>
<span class="s2">&#34;D:\Software\Git\bin\sh.exe&#34;</span>  --login -i -c <span class="s2">&#34;./deploy_public.sh&#34;</span>
<span class="s2">&#34;D:\Software\Git\bin\sh.exe&#34;</span>  --login -i -c <span class="s2">&#34;./deploy_hugo_blog.sh&#34;</span>
</code></pre></td></tr></table>
</div>
</div><p><code>&quot;D:\Software\Git\bin\sh.exe&quot; </code>是你git bash的存放路径。</p>
</div>
        </div>
    </div>
</li>
</ul>
<h3 id="64-开启gitee-pages服务">6.4 开启Gitee Pages服务</h3>
<p>点击<code>仓库</code>&mdash;&gt;<code>服务</code>&mdash;&gt;<code>Gitee Pages</code>服务。</p>
<p><img
        class="lazyload"
        src="/svg/loading.min.svg"
        data-src="https://gitee.com/lizilong1993/image/raw/master/202111031728384.png"
        data-srcset="https://gitee.com/lizilong1993/image/raw/master/202111031728384.png, https://gitee.com/lizilong1993/image/raw/master/202111031728384.png 1.5x, https://gitee.com/lizilong1993/image/raw/master/202111031728384.png 2x"
        data-sizes="auto"
        alt="https://gitee.com/lizilong1993/image/raw/master/202111031728384.png"
        title="image-20211103170421835" /></p>
<div class="details admonition note open">
        <div class="details-summary admonition-title">
            <i class="icon fas fa-pencil-alt fa-fw"></i>注意<i class="details-icon fas fa-angle-right fa-fw"></i>
        </div>
        <div class="details-content">
            <div class="admonition-content"><p>每次更新后都需要来点一下更新部署按钮。</p>
<p><img src="https://gitee.com/lizilong1993/image/raw/master/202111031728283.png" alt="image-20211103170711480" style="zoom:50%;" /></p>
</div>
        </div>
    </div>
<h2 id="done">7 完成</h2>
<p>至此已经完成全部配置啦！<i class="far fa-laugh-beam"></i></p>
<p>觉得有帮助，麻烦顺手给我<a href="https://gitee.com/lizilong1993/lizilong1993" target="_blank" rel="noopener noreffer">点个Star</a>吧 or <a href="https://lizilong1993.gitee.io/about/" target="_blank" rel="noopener noreffer">Buy me a coffee</a></p>
<h2 id="参考资料">参考资料</h2>
<ul>
<li><a href="https://blog.laoda.de/archives/blog-choosing" target="_blank" rel="noopener noreffer">Hexo还是Hugo？Typecho还是Wordpress？读完这篇或许你就有答案了！ - 二十五画生 (laoda.de)</a></li>
<li><a href="https://blog.csdn.net/qq_42185895/article/details/113780415" target="_blank" rel="noopener noreffer">在Linux系统搭建Hugo博客_WuJvya的博客-CSDN博客</a></li>
<li><a href="https://hugoloveit.com/zh-cn/theme-documentation-basics/" target="_blank" rel="noopener noreffer">LoveIt主题安装 (hugoloveit.com)</a></li>
<li><a href="https://fontawesome.cc/" target="_blank" rel="noopener noreffer">Font Awsome</a></li>
<li><a href="https://valine.js.org/quickstart.html" target="_blank" rel="noopener noreffer">Valine</a></li>
</ul></div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2021-11-03</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"><span>
                            <a class="link-to-markdown" href="/build-hugo-with-loveit-basic/index.md" target="_blank">阅读原始文档</a>
                        </span></div>
            <div class="post-info-share">
                <span></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/tags/%E5%8D%9A%E5%AE%A2/">博客</a>,&nbsp;<a href="/tags/hugo/">Hugo</a>,&nbsp;<a href="/tags/%E6%95%99%E7%A8%8B/">教程</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/book-recommended/" class="prev" rel="prev" title="好书推荐"><i class="fas fa-angle-left fa-fw"></i>好书推荐</a>
            <a href="/build-hugo-with-loveit/" class="next" rel="next" title="十分钟搭建一个私人的LoveIt风格博客">十分钟搭建一个私人的LoveIt风格博客<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
<div id="comments"><div id="valine" class="comment"></div><noscript>
                Please enable JavaScript to view the comments powered by <a href="https://valine.js.org/">Valine</a>.
            </noscript></div></article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.88.1">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2023</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/" target="_blank">Lioyd Shaw</a></span>&nbsp;|&nbsp;<span class="license"><a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span></div>
        </div>
    </footer>
 


</div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="/lib/valine/valine.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery.js@1.2.0/dist/css/lightgallery.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.css"><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/smooth-scroll@16.1.3/dist/smooth-scroll.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/autocomplete.js@0.37.1/dist/autocomplete.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/algoliasearch@4.2.0/dist/algoliasearch-lite.umd.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lazysizes@5.2.2/lazysizes.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lightgallery.js@1.2.0/dist/js/lightgallery.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lg-thumbnail.js@1.2.0/dist/lg-thumbnail.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/lg-zoom.js@1.2.0/dist/lg-zoom.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clipboard@2.0.6/dist/clipboard.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/copy-tex.min.js"></script><script type="text/javascript" src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/mhchem.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":10},"comment":{"valine":{"appId":"uefnzaEGhgPRfPDaRNWQ3MF4-MdYXbMMI","appKey":"4aOKu9jSOSSr2sL3DAec7Rkn","avatar":"robohash","el":"#valine","emojiCDN":"https://cdn.jsdelivr.net/npm/emoji-datasource-google@5.0.1/img/google/64/","emojiMaps":{"100":"1f4af.png","alien":"1f47d.png","anger":"1f4a2.png","angry":"1f620.png","anguished":"1f627.png","astonished":"1f632.png","black_heart":"1f5a4.png","blue_heart":"1f499.png","blush":"1f60a.png","bomb":"1f4a3.png","boom":"1f4a5.png","broken_heart":"1f494.png","brown_heart":"1f90e.png","clown_face":"1f921.png","cold_face":"1f976.png","cold_sweat":"1f630.png","confounded":"1f616.png","confused":"1f615.png","cry":"1f622.png","crying_cat_face":"1f63f.png","cupid":"1f498.png","dash":"1f4a8.png","disappointed":"1f61e.png","disappointed_relieved":"1f625.png","dizzy":"1f4ab.png","dizzy_face":"1f635.png","drooling_face":"1f924.png","exploding_head":"1f92f.png","expressionless":"1f611.png","face_vomiting":"1f92e.png","face_with_cowboy_hat":"1f920.png","face_with_hand_over_mouth":"1f92d.png","face_with_head_bandage":"1f915.png","face_with_monocle":"1f9d0.png","face_with_raised_eyebrow":"1f928.png","face_with_rolling_eyes":"1f644.png","face_with_symbols_on_mouth":"1f92c.png","face_with_thermometer":"1f912.png","fearful":"1f628.png","flushed":"1f633.png","frowning":"1f626.png","ghost":"1f47b.png","gift_heart":"1f49d.png","green_heart":"1f49a.png","grimacing":"1f62c.png","grin":"1f601.png","grinning":"1f600.png","hankey":"1f4a9.png","hear_no_evil":"1f649.png","heart":"2764-fe0f.png","heart_decoration":"1f49f.png","heart_eyes":"1f60d.png","heart_eyes_cat":"1f63b.png","heartbeat":"1f493.png","heartpulse":"1f497.png","heavy_heart_exclamation_mark_ornament":"2763-fe0f.png","hole":"1f573-fe0f.png","hot_face":"1f975.png","hugging_face":"1f917.png","hushed":"1f62f.png","imp":"1f47f.png","innocent":"1f607.png","japanese_goblin":"1f47a.png","japanese_ogre":"1f479.png","joy":"1f602.png","joy_cat":"1f639.png","kiss":"1f48b.png","kissing":"1f617.png","kissing_cat":"1f63d.png","kissing_closed_eyes":"1f61a.png","kissing_heart":"1f618.png","kissing_smiling_eyes":"1f619.png","laughing":"1f606.png","left_speech_bubble":"1f5e8-fe0f.png","love_letter":"1f48c.png","lying_face":"1f925.png","mask":"1f637.png","money_mouth_face":"1f911.png","nauseated_face":"1f922.png","nerd_face":"1f913.png","neutral_face":"1f610.png","no_mouth":"1f636.png","open_mouth":"1f62e.png","orange_heart":"1f9e1.png","partying_face":"1f973.png","pensive":"1f614.png","persevere":"1f623.png","pleading_face":"1f97a.png","pouting_cat":"1f63e.png","purple_heart":"1f49c.png","rage":"1f621.png","relaxed":"263a-fe0f.png","relieved":"1f60c.png","revolving_hearts":"1f49e.png","right_anger_bubble":"1f5ef-fe0f.png","robot_face":"1f916.png","rolling_on_the_floor_laughing":"1f923.png","scream":"1f631.png","scream_cat":"1f640.png","see_no_evil":"1f648.png","shushing_face":"1f92b.png","skull":"1f480.png","skull_and_crossbones":"2620-fe0f.png","sleeping":"1f634.png","sleepy":"1f62a.png","slightly_frowning_face":"1f641.png","slightly_smiling_face":"1f642.png","smile":"1f604.png","smile_cat":"1f638.png","smiley":"1f603.png","smiley_cat":"1f63a.png","smiling_face_with_3_hearts":"1f970.png","smiling_imp":"1f608.png","smirk":"1f60f.png","smirk_cat":"1f63c.png","sneezing_face":"1f927.png","sob":"1f62d.png","space_invader":"1f47e.png","sparkling_heart":"1f496.png","speak_no_evil":"1f64a.png","speech_balloon":"1f4ac.png","star-struck":"1f929.png","stuck_out_tongue":"1f61b.png","stuck_out_tongue_closed_eyes":"1f61d.png","stuck_out_tongue_winking_eye":"1f61c.png","sunglasses":"1f60e.png","sweat":"1f613.png","sweat_drops":"1f4a6.png","sweat_smile":"1f605.png","thinking_face":"1f914.png","thought_balloon":"1f4ad.png","tired_face":"1f62b.png","triumph":"1f624.png","two_hearts":"1f495.png","unamused":"1f612.png","upside_down_face":"1f643.png","weary":"1f629.png","white_frowning_face":"2639-fe0f.png","white_heart":"1f90d.png","wink":"1f609.png","woozy_face":"1f974.png","worried":"1f61f.png","yawning_face":"1f971.png","yellow_heart":"1f49b.png","yum":"1f60b.png","zany_face":"1f92a.png","zipper_mouth_face":"1f910.png","zzz":"1f4a4.png"},"enableQQ":true,"highlight":true,"lang":"zh-cn","pageSize":10,"placeholder":"留一个友善的评论吧","recordIP":true,"visitor":true}},"lightGallery":{"actualSize":false,"exThumbImage":"data-thumbnail","hideBarsDelay":2000,"selector":".lightgallery","speed":400,"thumbContHeight":80,"thumbWidth":80,"thumbnail":true},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false},"search":{"algoliaAppID":"PASDMWALPK","algoliaIndex":"index.zh-cn","algoliaSearchKey":"b42948e51daaa93df92381c8e2ac0f93","highlightTag":"em","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"algolia"}};</script><script type="text/javascript" src="/js/theme.min.js"></script></body>
</html>
